Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
How to get the value of the fields of the selected row?
posted

Dear all,

I use the xamDataGrid for the first time. I have binded the grid with a data table.

When I select one record, I want to popup the information of the current row. 

How can i get it?

Thanks. 

 

  • 275
    posted

    You can get the selected rows using:

    foreach (DataRecord rec in dataGrid.SelectedItems.Records) {
          //Do something like (DataRowView)rec.DataItem; if needed
    }

     

    -Mike