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.

OnQueryCellStyleInfo and DisplayElementKind.AddNewRecord

Thread ID:





62765 Jun 21,2007 10:18 AM Jun 21,2007 06:53 PM Windows Forms 1
Tags: GridControl
Asked On June 21, 2007 10:18 AM


we are using a GGC which is bound to a custom collection. There are columns in our grid which depend on other columns - so the cell types change in correspondence to other column values.

Currently we are handling this in the OnQueryCellStyleInfo event with the:

e.Style.CellType = "OurCellType1";

and so on.

The problem occurs for the AddNewRecord row. When we set the cell type for that cells, it seems the cell type isn't changed.

if (e.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.AddNewRecord)
if (e.Style.CellValue is IOurType)
e.Style.CellType = "OurType1";
IOurType ourType = e.Style.CellValue as IOurType;
if (ourType != null)
if (ourType.ReadOnly)
e.Style.ReadOnly = true;
else if (e.Style.CellValue.GetType().IsEnum)
e.Style.CellType = "EnumCell";


So how can we handle the dynamic cell types in the OnQueryCellStyleInfo for the AddNewRecord row?

haneefm [Syncfusion]
Replied On June 21, 2007 06:53 PM

Hi Tom,

Thank you for your update.

I am not sure of what be might be causing this strange behavior without a working sample. Is it possible for you to upload us a minimal sample to reproduce the issue here? This will help us to analyse the issue further.

Best regards,


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.