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
205
FixedRows Collection Cleared after Grouping
posted

Dear All,

In order to have a permanent, clickable 'footer' in my grid, I'm creating a dummy row in my data and - in the InitializeRow event - setting the Fixed property of the corresponding grid row to true.

The issue I'm having is that the FixedRows collection is cleared as soon as the user performs a group-by, and when they return to 'normal' view (i.e. non-grouped), InitializeRow doesn't fire and therefore my fixed row isn't restored.

Could anyone be so kind as to suggest a means by which I can restore the fixed row following a group-by?  Unlike InitializeRow, InitializeRowsCollection does at least fire when the grid reverts to its normal view, after a group-by.  Would writing a handler for this event be the best way to reliably restore the fixed row?

Many thanks in advance,

James

 

Parents
No Data
Reply
  • 5118
    Verified Answer
    posted

    Hi James,

    The grid does not track the row.fixed property in a way that would be remembered through grouping.  So if you perform a GroupBy the row.Fixed property (all the rows for that matter) is/are destroyed.  So when you ungroup there are no rows with a Fixed value of true.  

     

    My workaround is similar to what you suggest as shown in the attachment with some checks and code inside InitializeRowsCollection.  You can see the comments inside InitializeRowsCollection for more detail.   

     

    WinGridFixedRowAndGrouping.zip
Children