People seem to be overcomplicating this, this worked for me:
foreach (System.Data.DataRowView dr in yourDataGrid.ItemsSource)
{
MessageBox.Show(dr[0].ToString());
}
More Related Contents:
- How to get ToolTip from WPF Data Grid Column Header (DataGridTemplateColumn) in code?
- How do I bind a WPF DataGrid to a variable number of columns?
- Accessing UI (Main) Thread safely in WPF
- programmatically add column & rows to WPF Datagrid
- Select multiple items from a DataGrid in an MVVM WPF project
- How to bind DataTable to Datagrid
- Datagrid binding in WPF
- DataGrid get selected rows’ column values
- DataGrid shows path of image instead of image itself
- How can I set the color of a selected row in DataGrid
- Improve WPF DataGrid performance
- How to hide wpf datagrid columns depending on a property
- DataGrid column width doesn’t auto-update
- WPF Datagrid Get Selected Cell Value
- Data is visible in DataSet visualizer but does not show in a DataGrid
- How to loop over the rows of a WPF toolkit Datagrid
- How to build A WPF Datagrid with an unknown number of columns
- Date formatting in WPF datagrid
- Button in a column, getting the row from which it came on the Click event handler
- Merge Cells in WPF DataGrid
- DataGrid row content vertical alignment
- WPF DataGrid: DataGridComboxBox ItemsSource Binding to a Collection of Collections
- FindVisualChild reference issue
- OpenClipboard failed when copy pasting data from WPF DataGrid
- How do I bind a List to a WPF DataGrid?
- Binding datagrid column width
- WPF DataGrid – Event for New Rows?
- How to set background of a datagrid cell during AutoGeneratingColumn event depending on its value?
- How to bind column header to property in ViewModel? (WPF MVVM)
- WPF DataGrid CustomSort for each Column