Could someone please explain when are the proper times to use BeginInit and EndInit on Xceed.Grid (and other Xceed components in general). I appreciate it. I just don’t want to put them in my code all the time unless they’re really necessary, you know? Thanks.
Imported from legacy forums. Posted by oakfish (had 3490 views)
I use it when I need to change different things that influence the content of the GridControl, and that might cause sorting, painting or rebuilding of the GridControl’s DataRows. Example: when I have a GridControl that is bound to a DataTable or DataView, I call BeginInit before and EndInit after updating the content of the DataTable. When a GridControl is bound to a DataView, and the filter of the DataView has to change, I also put it between BeginInit and EndInit, because it causes the GridControl to rebuild its DataRows.
Imported from legacy forums. Posted by Tommy (had 388 views)
Xceed grid provides the BeginInit and EndInit functions to allow the developer to set many properties freely without causing those properties to trigger any required update code over and over. Only upon the EndInit would the update code be executed. So, this mechanism allows you to sometimes gain speed advantages, reduce unecessary screen updates, reduce database updates, etc.
Imported from legacy forums. Posted by Odi [Xceed] (had 4596 views)