Access Datagrid Row In WPF Through Index
Hi All,
This is just a repost from this site: Accessing DataGridRow on how to get or access the WPF Datagrid row through index.
Thanks for the original contributor, this helped me a lot.
This is just a repost from this site: Accessing DataGridRow on how to get or access the WPF Datagrid row through index.
DataGridRow dgr = (DataGridRow)dataGrid1.ItemContainerGenerator.ContainerFromIndex(nRowIndex); if (dgr == null) // row might be invisible (top / bottom). So, scroll into the view and get it { dataGrid1.UpdateLayout(); dataGrid1.ScrollIntoView(dataGrid1.Items[nRowIndex]); dgr = (DataGridRow)dataGrid1.ItemContainerGenerator.ContainerFromIndex(nRowIndex); }
Thanks Dude Its helps me a lot ................
ReplyDeleteGlad i could help... :D
Delete