We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Fastest way to iterate rows

Thread ID:

Created:

Updated:

Platform:

Replies:

39625 Jan 13,2006 12:11 AM Jan 24,2006 11:08 AM Windows Forms 5
loading
Tags: GridControl
va
Asked On January 13, 2006 12:11 AM

What methods should I call to iterate through rows and cell values so it would fire the fewest events etc... for the fastest iteration

stanleyj [Syncfusion]
Replied On January 14, 2006 03:40 AM

Hi Va, I am not sure what iteration methods you are looking for. Please refer this thread and see if that is related to your need. http://www.syncfusion.com/support/forums/message.aspx?MessageID=16755 Also refer this sample that is shipped. Syncfusion\Essential Studio\4.1.0.10\windows\Grid.Windows\Samples\In Depth\GridPopulationSample(also available in earlier versions) Check out Invalidate and Refresh methods. Regards, Stanley

va
Replied On January 14, 2006 06:09 PM

Sorry - I was unclear. I was wondering if calling the same functions through GridControl.Model instead of GridControl (like HideRows[], as well as Model.Data etc..) is faster because it may not fire events?

stanleyj [Syncfusion]
Replied On January 17, 2006 12:56 AM

Hi Va, You can call the CurrentCell.SuspendEvents and SuspendChangeEvents before the routines. It will prevent CurrentCell events. this.gridControl1.CurrentCell.SuspendEvents(); this.gridControl1.SuspendChangeEvents(); this.gridControl1.ResumeChangeEvents(); this.gridControl1.CurrentCell.ResumeEvents(); You can directly access the GridData object instead of using an indexer on the grid. This will avoid events and probably be a factor of 5 - 10 times faster. Please refer this thread for more details. Best Regards, Stanley

va
Replied On January 18, 2006 07:44 AM

Right. But if I use the model to also all the Model.Functions... do all counterpart Model.Functions that have the same name as GridControl.Functions ALSO not call the events?

stanleyj [Syncfusion]
Replied On January 24, 2006 11:08 AM

Hi Va, If HideRows is making things slower then try grid.RowHeights.SetRange method. Grid and Grid.Model has to be the same. Regards, Stanley

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;