The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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?
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.
TOTomasNovember 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.