Any one tell me how can i itrate through all the rows in DataGrid in WPF .....
and it should be noted that there is not any .Row property in WPF DataGrid as WinForm has . So please any one can tell me the alternate way to do so .
I`m using Visual Studio 2013 Pro .


Sanjay KumarRank #561 · 4.3K reputationPosted Aug 6, 2014, 3:03 AM EDT
try this link
http://stackoverflow.com/questions/15686381/wpf-iterate-through-datagrid
http://stackoverflow.com/questions/13449016/iterate-to-all-cells-in-wpf-datagrid
Asad Vegito11 reputationPosted Aug 6, 2014, 3:10 AM EDT
public IEnumerableMicrosoft.Windows.Controls.DataGridRow> GetDataGridRows(Microsoft.Windows.Controls.DataGrid grid) { var itemsSource = grid.ItemsSource as IEnumerable; if (null == itemsSource) yield return null; foreach (var item in itemsSource) { var row = grid.ItemContainerGenerator.ContainerFromItem(item) as Microsoft.Windows.Controls.DataGridRow; if (null != row) yield return row; } } iEnumerableSanjay KumarRank #561 · 4.3K reputationPosted Aug 6, 2014, 4:33 AM EDT
Visual Studio 2013 System.Windows.Controls.Data.dll missing
http://msdn.microsoft.com/en-IN/library/system.windows.controls.datagrid.itemssource(v=vs.95).aspx
https://wpf.codeplex.com/discussions/43290
http://social.msdn.microsoft.com/Forums/vstudio/en-US/90ff85f5-b053-46ff-8065-44fbdf7dddb2/missing-assembly-reference-to-using-systemwindowsdatagrid?forum=csharpgeneral