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
50
Don't want any rows Active after clearing Group By Column
posted

Long story short, I want no row to be active after I clear the grouping.

Whether I clear it by dragging the grouping out of the grouping box, or if I do it programatically with ug.DisplayLayout.ClearGroupByColumns(), I always end up with 1 active row.  This row is NOT selected, but is active.

I am setting ug.ActiveRow = null directly after I call ClearGroupByColumns(), and it still does not deactivate the row.  But even if this worked, it would not help if the user dragged the grouping away.  This is how I've always deactivated the active row if I needed to.

HOWEVER, if I group the rows, expand one or more groups and select one or more rows, then clear the groupings, the selected rows persist and no rows are active!  This is fine, but if the user has not selected any rows while grouped, then clears groupings, I need to have no active rows.

Thanks for any ideas.

Parents
No Data
Reply
  • 71886
    Verified Answer
    Offline posted

    Hello BamaBob,

    This is happening because right after ungroupping the 'ActiveRow' is null, the active row is being assigned later. So could you please try the following code and let me know if it suits your needs:

            private void ultraGrid1_AfterSortChange(object sender, Infragistics.Win.UltraWinGrid.BandEventArgs e)

            {

                ultraGrid1.ActiveRow = ultraGrid1.Rows[0];

                ultraGrid1.ActiveRow = null;

            }

Children