Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6800623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:59:32+00:00 2026-05-26T18:59:32+00:00

I m working with WPF DataGrid and I want to retrieve a DataGridCell ‘s

  • 0

I m working with WPF DataGrid and I want to retrieve a DataGridCell‘s value by using the column and the row indexes : all what I could do is this but it didn’t work :

myDatGrid.Columns[0].GetCellContent((DataGridRow)myDatGrid.Items[0]);

Could you please show me the way to realize that

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:59:32+00:00Added an answer on May 26, 2026 at 6:59 pm

    Your cells value is going to be contingent on what the given column is bound to. The entire row will be the instance of your model.

    Assume we have a collection of Person classes which we are binding to within our DataGrid.

    Person p = ((ContentPresenter)myDatGrid.Columns[0].GetCellContent(myDatGrid.Items[0])).Content;
    

    The Content property is going to return the underlying model for the row. If you wanted to obtain a given property you can do so by directly accessing the underyling object which should implement INotifyPropertyChanged, no need to fool with the DataGrid as you would in a WinForms application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using wpf toolkit's datagrid i want to marge a row for all
Hi I'm working with a wpf DataGrid and I'd like to add a column
Im working on a middle size project, using WPF. Need DataGrid, suitable for the
I am working with WPF DataGrid. I have to drag the Column Header, drop
OK, working on WPF(using MVVM) and came across a question, want some input. I
I am working with Visual studio 2008. I want to work on WPF DataGrid
I can't believe I'm back to this after working with WPF for 3 months
I'm using Visual Studio 2008. I'm currently working with WPF and I'm using Edit->Format
I'm working on a WPF application and is using the Model-View-ViewModel pattern. The application
I'm working on a WPF application, and I'm structuring it using the MVVM pattern.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.