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

Updating column appearance

Thread ID:





50825 Oct 19,2006 06:48 PM UTC Oct 23,2006 08:07 PM UTC WinForms 3
Tags: GridControl
Asked On October 19, 2006 06:48 PM UTC

I have created a DateTimeCellAppearance class which is a subclass GridTableCellAppearance. I set the Appearance property of one of my GridColumnDesriptor objects to be an instance of this DateTimeCellAppearance object.

Within the DateTimeCellAppearance class, I'm changing the AnyrecordFieldCell.Format property every so often to vary from "MM/dd/yyyy" to "dd/MM/yyyy". I would like for these changes to be reflected in my grid, but for some reason, they are not reflected.

Any suggestions on how I can get this to work?



Jayakumar Natarajan [Syncfusion]
Replied On October 20, 2006 10:58 PM UTC

Hi Ecastill,
I am not sure whether it would work. We are trying to setup a sample to see the behavior here. If you could send us your sample, it would be helpful.


Replied On October 22, 2006 06:59 PM UTC

Attached is an example. Modifying the appearance internally doesn't seem to work, but re-assigning the appearance of the column seems to work.

Modifying the appearance internally then notifying the parent grid of change would be ideal. I've tried calling Owner.RaiseAppearanceChanged from inside my custom appearance, but this doesn't work. Any suggestions?




Jayakumar Natarajan [Syncfusion]
Replied On October 23, 2006 08:07 PM UTC

Hi Eric,
It is not possible to assign an instance of a Appearance object to a column descriptor or any other engine object. When you call the Appearance setter it will just copy the values from the object.

This is the Appearance getter/setter for reference:

public GridTableCellAppearance Appearance
if (appearance == null)
appearance = new GridTableCellAppearance(this);
appearance.PropertyFilter = GridTableCellAppearance.ColumnDescriptorPropertyFilter;
return appearance;
if (value != null)

Therefore modifying your appearance object internally will have no effect on the columns that is was previously assigned to. Every time you make a change to your appearance object you will have to reapply them to the columns you applied it.

You could try to define a base style instead and register it with GridGroupingControl.BaseStyles. Then your column can specify that “basestyle” to inherit settings from and changes made to the base style will be reflected in the columns.

This is description of GridGroupingControl.BaseStyles


/// Maintains a collection of base styles. Users can add BaseStyles to the engine (also in design-time) and

/// then inherit style settings through the GridStyleInfo.BaseStyle property in

/// property of .


public GridTableBaseStyleCollection BaseStyles



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