Home Forums WinForms controls Xceed Grid for WinForms Detail grid data loading time? Reply To: Detail grid data loading time?

User (Old forums)
Member
Post count: 23064

Well we’re not sure what could explain the 0.0 score for the second DetailGrid, but the 7 sec for the first one is problematic.  Is the code inside a GridControl.BeginInit and EndInit block?  If so, and if the grid templates are set to be collapsed, no detail rows are actually created, so the loading should not be longer than simply binding the grid to the master source.

The following should not be the problem, but just in case, you can remove the UpdateDetailGrids calls on the DetailGrids.  The only one you really need is the UpdateDetailGrids on the GridControl as such, and only once all DetailGridTemplates have been added.

i.e.:

gridControl.BeginInit();

gridControl.SetDataBindings( mainDataSource, “mainDataMember” )

DetailGrid detailGridTemplate1 = new DetailGrid();
detailGridTemplate1.SetDataBindings( mainDataSource, “mainDataMemberName.MasterDetail1Relationship” );
gridControl.DetailGridTemplates.Add( detailGridTemplate1 );

DetailGrid detailGridTemplate2 = new DetailGrid();
detailGridTemplate2.SetDataBindings( mainDataSource, “mainDataMemberName.MasterDetail2Relationship” );
gridControl.DetailGridTemplates.Add( detailGridTemplate2 );

gridControl.UpdateDetailGrids();

gridControl.EndInit();

 

Imported from legacy forums. Posted by André (had 666 views)