Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
Inbuilt feature of xamgrid to show rows count with it .
posted

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..

Parents
  • 21382
    Suggested Answer
    posted

    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.

Reply Children