Home Forums WinForms controls Xceed Grid for WinForms How to get Visible Rows Count in Grid

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #17090 |

    I am trying to get Visible Rows Count using looping through ParentGroup’s GetSortedRows.

    Is there any simpler way then that, without looping at all?

    I am using filtering so setting visible on and off all the time to DataRows, so need to find that information for footers and the dynamic groupings I am adding.

     

     

     

     

     

     

     

    Imported from legacy forums. Posted by NR (had 1474 views)

    User (Old forums)
    Member
    Post count: 23064

    The only solution I see to this (but of course I don’t know your whole scenario, so it may not be applicable) is to keep a count in the event where you update the visibility of DataRows.  Increase or decrease the count for each row you set the Visible property to true or false, accordingly.  In doing that, your count will always be the actual count of visible rows.

    You can use the Tag property on the ParentGroup to store and update this value for each group.

    Imported from legacy forums. Posted by André (had 1874 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi André,

    I am doing exactly same thing and it works that way, I was just wondering if there is something already there which I cannot find.

    Thank you for your suggestion and it works perfectly fine now.

    NR

     

     

    Imported from legacy forums. Posted by NR (had 1871 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.