The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi,
I would like to do a View Refresh of all the records in a particular group instead of doing a ggc.Refresh() as I want to do it more efficiently.
I have the GridGroup but how can I find all the view row indexes so that I can get a GridRange together ?
Thanks
Dev.
ADAdministrator Syncfusion Team April 14, 2005 05:58 PM UTC
Here is a rough try at this. It will require tweaking when you are at the last group and maybe in some other cases as well.
//given group g
Group parentGroup = g.ParentGroup;
GridTable table = g.ParentTable as GridTable;
int i = parentGroup.Groups.IndexOf(g);
int row1 = table.DisplayElements.IndexOf(g);
int row2 = table.DisplayElements.IndexOf(parentGroup.Groups[i+1]);
this.gridGroupingControl1.TableControl.RefreshRange(GridRangeInfo.Rows(row1, row2));
Console.WriteLine(row1.ToString() + " " + row2.ToString());