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.
Unfortunately, activation email could not send to your email. Please try again.

QueryCellInfo Event

Thread ID:

Created:

Updated:

Platform:

Replies:

46793 Jul 20,2006 11:43 AM Jul 21,2006 02:53 AM Windows Forms 1
loading
Tags: GridControl
Ravichandran
Asked On July 20, 2006 11:43 AM

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

Administrator [Syncfusion]
Replied On July 21, 2006 02:53 AM

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

CONFIRMATION

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.

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.

;