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
close icon

Rowstyle performance in a GDBG

I have some problems with slow perfomance using rowstyles in a GridDataBoundGrid. If I add the following code into the QueryCellInfo event the grid gets so slow that it is hard to work with it: if((e.RowIndex > 0) && (e.RowIndex < currentGridModel.RowCount)) { if((Convert.ToInt32(currentGridModel[e.RowIndex,17].CellValue) == 0)) { e.Style.ReadOnly = false; } else { e.Style.ReadOnly = true; e.Style.BackColor = Color.White; } e.Handled = true; } I already have other style changes made in this event without any major performance issues, and the grid contains no more than 200 rows. I can see the same tendence with the last row to which I have added bold and italic style. It always feel more slow than an ordinary row when I scroll it into view etc. Any ideas about what I can do to speed things up?

2 Replies

TO Tomas November 8, 2005 09:21 AM UTC

I forgot to say that the above code is placed within an if-statement looking like this: if(e.ColIndex == -1) I do this to know that is it a specific rowstyle I''m working with.


TO Tomas November 8, 2005 10:09 AM UTC

I have solved this issue. Instead of fetching validation values from the grid, as this probably triggers even more events, I changed the code to get them from the datasource instead and gained LOTS of performance.

Loader.
Live Chat Icon For mobile
Up arrow icon