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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Difference between updating using GridData and model.SetCells

Thread ID:





41543 Mar 4,2006 05:26 AM UTC Mar 7,2006 04:15 PM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On March 4, 2006 05:26 AM UTC

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 01:04 PM UTC

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 05:35 PM UTC

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 04:15 PM UTC

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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon