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
close icon

GridColumnDescriptor default constructor

Hi together,

we have recognized some strange behavior in our current project. If you create a column descriptor (GridColumnDescriptor) which is not bound to a table descriptor yet, some properties of the newly created object are not set correctly (e.g. null reference)

An example is:

Appearance.AnyRecordFieldCell.Font

After I added the newly created grid column descriptor to a table descriptor object, the font property mentioned above is correct.

So my question: How can I create a grid column descriptor which is initialized correctly even if it is not added to a table descriptor?

Thanks in advance

Cheers,
Chris

1 Reply

AD Administrator Syncfusion Team February 21, 2007 06:38 PM UTC

Hi Chris,

How can I create a grid column descriptor which is initialized correctly even if it is not added to a table descriptor?
>>>>>>>
Please try the below code snippet to create the grid column descriptor with mapping name(column name).

GridColumnDescriptor cd = new GridColumnDescriptor("MappingName");
cd.Appearance.AnyRecordFieldCell.BackColor = Color.Red;

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon