Question

I was trying to add multiple datagrid .Counts together But didn't quite work. It works on linq Pad but didn't work in visual studio.
I have 4 datagrids: datagrid1, datagrid2, datagrid3, datagrid4 I am Currently Using RadDataGrids

Var Total = datagrid1.Count() + datagrid2.Count() + datagrid3.Count() + datagrid4.Count()  

That code didn't quite work, Not sure what's happening

Was it helpful?

Solution

If I looke at the right place, it looks like you could use ItemsSource property

something like

var total = dataGrid1.ItemsSource.Count() + dataGrid2.ItemsSource.Count() + dataGrid3.ItemsSource.Count();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top