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. Image for the cookie policy date

OnQueryCellStyleInfo and DisplayElementKind.AddNewRecord

Hi,

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?


1 Reply

HA haneefm Syncfusion Team June 21, 2007 10:53 PM UTC

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,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon