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.
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;
}
I am checking about the progress of this issue. Please let me know If you need any further assistance on this.
Boris,
Please forgive me for not followup up!
I was actually able to use your tip in a slightly different scenario, so it was very helpful.
Particularly, knowing that you have to first set the active row to an actual row, then it allows you to set it to null.
I NEVER would have thought to try that!
thanks again!
-Bob