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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to reduce time loading grid? (1.6.1)

Thread ID:

Created:

Updated:

Platform:

Replies:

17307 Aug 5,2004 02:40 PM UTC Aug 5,2004 03:36 PM UTC WinForms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 5, 2004 02:40 PM UTC

So I have a grid that contains calculated values for each month of about 160 rows. Below is an example of how I populate the grid. Currently it takes approximately 10 seconds to populate the grid. Are there any techniques that I could employ to speed this process up? Thanks, s.s. BeginUpdate() Dim value as Decimal Dim gsi As GridStyleInfo = New GridStyleInfo() For Each = deptID In DeptList For Each DeptItemID In DeptItems For month = 1 To 12 '' get values from local DataTable, '' peform calculations, '' and return the result gsi.CellValue = CalculateNewValue(DeptID, DeptItemID, month) GridControl1.SetCellInfo(row, col, gsi, Syncfusion.Styles.StyleModifyType.Changes) Next Next Next EndUpdate()

Administrator [Syncfusion]
Replied On August 5, 2004 03:00 PM UTC

Try code like this. It works directly with the GridData object and avoids events. (I did this without syntax checking so I may have mistyped something).
Dim data As GridData = GridControl1.Data
''''.....

For month = 1 To 12
'''' get values from local DataTable,
'''' peform calculations,
'''' and return the result
Dim style as GridStyleInfo
If Not data(row, col) is Nothing Then
	style = new GridStyleInfo(data(row, col))
else
	style = new GridStyleInfo()
endif
style.CellValue = CalculateNewValue(DeptID, DeptItemID, month)

data(row, col) = style.Store
Next

Administrator [Syncfusion]
Replied On August 5, 2004 03:36 PM UTC

Thanks, Clay. That cut the time in half. I suspect the rest of the time is spent performing the actual calculations. Guess I''ll have to fix that on my own! s.s.

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.

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

;