Is there any performance setback if the grid formatting is done in an event other than the grid's Initialize Layout ?
Thanks !
And there was an interesting discussion with my friends on the best practices. Using Initialize Layout for formatting grid columns is a best practice ? Well, it is debatable isn't it ?
Hello Viswanth,
I am just checking to see if Mike's answer helped you solve your issue. If you have any further questions, please don't hesitate to ask them.
Thank you for using Infragistics Components.
When are the 7 seconds lost? When running this code? I can't see any reason why this code should take 7 seconds to run. It should be instantaneous. It might take the grid a second to repaint afterward, but the execution of this code itself should be very fast.
Can you post a small sample project demonstrating this delay?
viswanth said:This UltraCombo is set to a grid column as value list. I have around 20K records being pulled. I create an UltraCombo during runtime and set the datasource. Can i pull over the control in the designer and set these in design time ? Will it improve the performance ?
You could bind the control at design-time, but I doubt it would make any real difference in performance. The data still has to be loaded at run-time. But again, it's really not clear to me what kind of performance problems you are having or what is causing them. You aren't really giving me much information to work with here.
Thanks for the insight.
Also, i noticed that whenever i use "override" in setting UltraCombo columns i see a performance hit. I lost ~ 7 secs in setting the following.
DisplayLayout.Override.ActiveRowAppearance
DisplayLayout.Override.AllowRowFiltering
DisplayLayout.Override.FilterUIType
DisplayLayout.Override.HeaderAppearance.BackColor
DisplayLayout.Override.HeaderAppearance.FontData
This UltraCombo is set to a grid column as value list. I have around 20K records being pulled. I create an UltraCombo during runtime and set the datasource. Can i pull over the control in the designer and set these in design time ? Will it improve the performance ? Any thoughts on fine tuning.
Hi,
I guess is depends on what other event you are using. InitializeLayout is good for a number of reasons. For one thing, it fires any time you set the DataSource on the grid. So if you change or reload your data source, you don't have to worry about calling the same code again since it will be fired automatically.
It also fires at a time when the grid has access to the data source and the layout has been built so you can access the columns.
As far as performance goes, I'm not sure there are any big performance benefits to using this event. It's more for convenience.