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

InsertRange poor performance

Thread ID:

Created:

Updated:

Platform:

Replies:

76948 Sep 30,2008 04:45 PM UTC Oct 16,2008 08:33 PM UTC WinForms 2
loading
Tags: GridControl
Tim Mostad
Asked On September 30, 2008 04:45 PM UTC

The following line in a custom grid control derived from GridControl is consuming 73% of the time in a critical section of code:

Me.Rows.InsertRange(CInt(RowLocation), 1)

InsertColumn is also very slow. Is there some way to improve performance?




Administrator [Syncfusion]
Replied On October 1, 2008 07:34 PM UTC

Is the InsertRange call being done repeatedly? If so, you might try bracketing your calls with BeginUpdate/EndUpdate to see that makes things faster.

Me.BeginUpdate()

'do all your inserts...
Me.Rows.InsertRange(CInt(RowLocation), 1)
'...
Me.Rows.InsertRange(CInt(RowLocation), 1)
'...

Me.EndUpdate()
Me.Refresh()


Another thing you might try is to set:

OptimizeInsertRemoveCells = True



Tim Mostad
Replied On October 16, 2008 08:33 PM UTC

Both of these made a huge difference in the performance of my app. Thanks!


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.

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

;