Home - Forums-.NET - FlyGrid.Net (Windows Forms) - FlyGrid.BeginInit() - FlyGrid.EndInit() when to use?

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

FlyGrid.BeginInit() - FlyGrid.EndInit() when to use?
Link Posted: 14-Mar-2006 10:04
Can you please give a precise answer when to use BeginInit/EndInit and when not to use it?
Sometimes you say, use it when node is added then I check your samples and you don't do it there .. same for adding columns, etc.
So can you please give a precise answer on when to use it?

Thanks
Link Posted: 15-Mar-2006 05:08
Actions that cause FlyGrid to recalculate require BeginInt()/EndInit.
Usage of BeginInit locks events firing from Rows and Columns and locks recalculations until FlyGrid is unlocked with EndInit.
If you add single node or single column - it is not necessary to use BeginInit/EndInit, as BeginInit/EndInit doesn't increase performance of this operation, but if you do complex modifications (addition of tons of nodes or columns, batch cell modifications/replacements)- you should use BeginInit/EndInit to increase performance.
Link Posted: 15-Mar-2006 05:09
so, this is only about performance and nothing else?
Link Posted: 15-Mar-2006 05:43
yes.
Link Posted: 15-Mar-2006 15:33
okay, thx for clarification