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. Image for the cookie policy date

How to reduce time loading grid? (1.6.1)

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()

2 Replies

AD Administrator Syncfusion Team 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


AD Administrator Syncfusion Team 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.

Loader.
Live Chat Icon For mobile
Up arrow icon