Home Forums WinForms controls Xceed Grid for WinForms Sorting of Groups Reply To: Sorting of Groups

User (Old forums)
Member
Post count: 23064

Yes, the problem that I am facing is the number of rows. I was able to find the DataRow Title which includes the number of rows underneath a group in this block of code. But I am wondering how I can do this for the GroupKeys:

private void dataViewGrid_GroupingUpdated(object sender, EventArgs e)
{
Xceed.Grid.GridControl grid = sender as Xceed.Grid.GridControl;
if (grid.Groups.Count > 0)
{
GroupManagerRow row = (GroupManagerRow)grid.Groups[0].AmbientParent.GridControl.CurrentRow;
string title = row.Title;
int start = title.IndexOf(“-“)+1;
int length =title.IndexOf(“item”) – start;
string count = title.Substring(start, length).Trim();
}

}
The problem that I am facing is that because the user is dynamically creating the groups by dragging and dropping the columns to the column manager in the default datagridview I can’t seem to readily access the datarows for any group.

Is there any apparent way that I could access that DataRows attribute through the GroupManagerRow?

Thanks,

Imported from legacy forums. Posted by TParker (had 348 views)