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

Grid seems sluggish when scrolling...

I have a grid (approximately 80 rows by 100 columns). Obviously, not all of the grid can be displayed on the screen at one time. When scrolling up/down and side-to-side, the grid is not very repsonsive about repainting itself. Sometimes it can take 2 or 3 seconds for the grid to completely finish repainting after a multi-row scroll operation. Any suggestions on how I could improve the responsiveness?

6 Replies

AD Administrator Syncfusion Team September 16, 2003 05:21 PM

What can of cells do you have? Are you using special cells like currency cells? If so, here is forum thread on this problem. http://www.syncfusion.com/forums/message.asp?MessageID=6944


SS Steve S. September 17, 2003 09:48 AM

Clay- Thanks for the info. Actually, most of my cells are of type "FormulaCell". I plan on learning more about the use of virtual grids, and the QueryCellInfo method -- perhaps that will speed things up a bit. In the meantime, here's a snippet of my code in case you have any suggestions to make: ---------------------- foreach (DataRow row in dater.Rows) { int GridRow = (int)row["row_number"]; string styleName; switch((string)row["cell_type"]) { case "Text": gridStyleInfo.CellType = "Static"; gridStyleInfo.CellValue = (string)row["cell_value"]; this.gridControl1.SetCellInfo(GridRow, myColumnNumber, gridStyleInfo, Syncfusion.Styles.StyleModifyType.Changes); break; case "Formula": gridStyleInfo.CellValue = (string)row["cell_value"]; gridStyleInfo.CellType = "FormulaCell"; this.gridControl1.SetCellInfo(GridRow, myColumnNumber, gridStyleInfo, Syncfusion.Styles.StyleModifyType.Changes); break; case "Data": gridStyleInfo.CellType = "TextBox"; gridStyleInfo.CellValue = DataAccess.GetActualValue(); this.gridControl1.SetCellInfo(GridRow, gridContext.ColumnNumber, gridStyleInfo, Syncfusion.Styles.StyleModifyType.Changes); break; } } ------------------------ Thanks for all your help, s.s.


AD Administrator Syncfusion Team September 17, 2003 01:53 PM

Where do you have this code in your program?


SH Sue Harris September 17, 2003 07:16 PM

Steve, I've noticed in my grid that refreshing is very slow when I'm running within visual studio, but speeds up dramatically when I run it outside the IDE. Could this be what you're noticing? Regards, Sue


BT Brooks Tobey November 20, 2003 02:16 PM

I am having the same problem. I too have a relatively small grid 100 X 200 with many formulas. Using it for an Excel-type application. Yes, it is faster outside of the IDE, but it is still sluggish scrolling right. I have found that, in my case, the slowness is caused by it putting the formulas in the cells (and any cell that the formula depends on) as they come into view when scrolling. You can see this by putting the following code in the GridMain_CellsChanging event (VB Code): Debug.WriteLine("row/Col: " & e.CellsInfo(0).CellIdentity.RowIndex & " / " & e.CellsInfo(0).CellIdentity.ColIndex & " Old Val: " & grdMain(3, 3).Text & " New Val: " & e.CellsInfo(0).Text) After you scroll through the entire grid, it is fast because the cells are loaded. Syncfusion Question: Is there any way to force the formulas (and for that matter, any cell contents) to be loaded into the entire grid all at once and not as they are scrolled to? I think this would seem faster to the user. Thanks, Brooks > Steve, > > I've noticed in my grid that refreshing is very slow when I'm running within visual studio, but speeds up dramatically when I run it outside the IDE. Could this be what you're noticing? > > Regards, > Sue


AD Administrator Syncfusion Team November 20, 2003 02:52 PM

In 1.6.1.8 (available from your support home page), there is a FormulaEngine.RecalculateRange that you can use to force the formulas to be calculated. So, after your grid has been populated, you can call: GridFormulaCellModel model = this.gridControl1.CellModels["FormulaCell"] as GridFormulaCellModel; model.Engine.RecalculateRange(GridRangeInfo.Table(), true);

Loader.
Live Chat Icon For mobile
Up arrow icon