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.

Difference between updating using GridData and model.SetCells

Thread ID:





41543 Mar 4,2006 12:26 AM Mar 7,2006 11:15 AM Windows Forms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On March 4, 2006 12:26 AM

What''s the difference between updating a range of cells using the GridData object and doing the same thing using gridmodel.SetCells? When should I use one and not the other? Thanks

stanleyj [Syncfusion]
Replied On March 5, 2006 08:04 AM

Hi, 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

Administrator [Syncfusion]
Replied On March 6, 2006 12:35 PM

Hi, I know (from reading this forum) that the grid indexer is more of a convenience feature and less of a practical and performance feature so I don''t use it. My question was regarding the use of the gridmodel.SetCells(range, gridstyleinfostoretable) which seems to exist for doing bulk updates to the grid. I''m just wondering which is faster and when you would use one over the other. Thanks.

Administrator [Syncfusion]
Replied On March 7, 2006 11:15 AM

Hi, Assigning data through the GridData will be faster compared to SetCells method. If you trace in the source code ( GridData.cs and GridControl.SetCells( ) ), you can find the SetCells method is in turn calling another methods ( SetCellInfo ( ) and GridStyleInfoStore ) to set the data. Where as, in the GridData the data is directly assigned to the grid. Refer to the source code for more details. Best regards, Madhan


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.