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

Rowstyle performance in a GDBG

Thread ID:





36696 Nov 8,2005 09:13 AM UTC Nov 8,2005 10:09 AM UTC WinForms 2
Tags: GridControl
Asked On November 8, 2005 09:13 AM UTC

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?

Replied On 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.

Replied On 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.


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

This page will automatically be redirected to the 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