Is there any inbuilt feature of xamgrid so that I can show rows count along with xamgrid whenever xamgrid gets loaded? I want to display total no. of rows (rows count=?) present in xamgrid.If there is no any inbuilt feature then help with code if possible..
There isn't anything in the XamGrid that is going to display the number of rows.
As long as you aren't delay loading your DataSource, you could look at the grid.Rows.Count and get how many rows you have (assuming flat datasource). By that measure you could look at the grid.ItemSource, cast it up from an IEnumerable to your list type and get it's .Count instead.
If your data is hiearchial, you would probably want to go through your object model to find out how much data is in it, rather then go through the grid for performance reasons.
If you just want row numbers then you can turn these on off the RowSelectorSettings object off the grid.
Darrell,
I am trying to do a similar thing; display the row count in the header of child grids in a hierarchical grid. You mention that a solution would be to "go through your object model to find out how much data is in it", but am not sure how to translate that to code.
If you were to take the hierarchical xamgrid example supplied by Infragistics in the demos as an example, how would I display a count of the number of Orders for each customer in the header of each Orders child grid? Can you provide the Xaml as an example please?
Thanks,
Andrew