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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

OnQueryCellStyleInfo and DisplayElementKind.AddNewRecord

Thread ID:





62765 Jun 21,2007 02:18 PM UTC Jun 21,2007 10:53 PM UTC WinForms 1
Tags: GridControl
Asked On June 21, 2007 02:18 PM UTC


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


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon