QueryCellInfo Event

Hi

In QueryCellInfo I am assigning the CellValue based on the underlying datasource like the following line

e.Style.CellValue = m_document[e.RowIndex - 1, e.ColIndex];

In this case it grid is paining the values quickly.

Here there is a one to one mapping between the e.ColIndex and the document column.
But the requirement is that the user can choose the cols to be displayed on the screen as they want. So I maintained the preferred cols in an ArralyList. Now the one to one mapping between my datasouce and the grid cols will be broken and will get wrong data as cellValue.

To avoid this i modifed the QueryCellInfo event like

if(DisplayColumns != null && DisplayColumns.Count > 0)
{
col = Convert.ToInt32(DisplayColumns[e.ColIndex]);
}
else
{
col = e.ColIndex ;
}
e.Style.CellValue = m_document[e.RowIndex - 1, col];


This are working fine but taking long time to paint the values...

Give me some suggestion to avoid time taking to paint the rows.

Thanks
Ravi

1 Reply

AD Administrator Syncfusion Team July 21, 2006 06:53 AM UTC

Hi Ravi,

Please try the below sample that works fine for your purpose, in displaying the correct cellvalue for the appropriate columns in the grid, when the columns are chosen by the user. I dont see the long delay which you have mentioned, with your code.

Here is a sample
http://www.syncfusion.com/Support/user/uploads/VirtualGrid2_119c14de.zip

Let me know if this helps.
Thanks,
Rajagopal

Loader.
Up arrow icon