Home Forums WinForms controls Xceed Grid for WinForms Force grouping update? Reply To: Force grouping update?

User (Old forums)
Member
Post count: 23064

I did indeed, but instead of getting the desired effect, the value of the cell changed back to it’s original value. This is when calling the method from the EditLeft event. So I tried calling it from the ValueChanged event, in which case all the rows disappear, or becomes invisible or whatever is happening. It’s just empty anyways.

I’m grouping manually. Since the value I wish to group by is in a detail grid and I want the grouping to reside in the root grid, I figured this is the way I have to do it. So I simply do this in the QueryGroupKeys event:

private void OnQueryGroupKeys(object sender, QueryGroupKeysEventArgs e)
{
MemberRow memberRow = FindByMemberID(e.DataRow);
MemberStatus status = (MemberStatus)memberRow.Status;

e.GroupKeys[0] = Enums.GetDescription(status);
}

and in the ValueChanged event:

private void OnValueChanged(object sender, EventArgs e)
{
grid.UpdateGrouping();
}

Imported from legacy forums. Posted by macke (had 447 views)