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

GridStyleInfo and GridgroupingControl

Thread ID:





51353 Nov 3,2006 08:55 AM UTC Nov 6,2006 11:31 AM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On November 3, 2006 08:55 AM UTC

How can i get the GridStyleInfo for a column in a gridgrouping control?

in a DataBoundGrid i use:
Dim style As GridStyleInfo = Me.GridDataBoundGrid1.GridBoundColumns(XXX).StyleInfo


Administrator [Syncfusion]
Replied On November 3, 2006 10:38 AM UTC

Hi Stelios,

The attached sample demonstrates the formatting on columns. This can be achieved by defining a GridColumnDescriptor. It provides the mapping information to a column of the underlying datasource. You can associate this descriptor with a particular column by initializing its mapping name to the required column name. Once this is done, then the descriptor can be used to set the style settings for the specified column. Here is a sample code snippet.

GridColumnDescriptor column = this.gridGroupingControl1.TableDescriptor.Columns[1];
//For all cell in a column.
column.Appearance.AnyCell.BackColor = Color.Red;
//For header cell in a column...
column.Appearance.AnyHeaderCell.Themed = false;
column.Appearance.AnyHeaderCell.BackColor = Color.Green;
//For all alternate records cell in a column.
column.Appearance.AlternateRecordFieldCell.BackColor = Color.Blue;
//For all records cell in a column.
column.Appearance.RecordFieldCell.BackColor = Color.Yellow;

Here is a sample.

Best Regards,

Administrator [Syncfusion]
Replied On November 3, 2006 11:49 AM UTC

Hi Haneef

Thanks for your reply.
It works using GridColumnDescriptor.

I was trying to set a custom cell type for a column.
Could you please help me understand what is the difference between :
Me.GridGroupingControl1.TableDescriptor.Columns(1).Appearance.AnyCell = "mytype"


Me.GridGroupingControl1.TableModel.ColStyles(1).CellType = "mytype"


Administrator [Syncfusion]
Replied On November 6, 2006 11:31 AM UTC

Hi Stelios,

Me.GridGroupingControl1.TableModel.ColStyles(1).CellType = "mytype"

The above code doesn't work for the gridgrouping control. The reason is that the code is non-functional as they are not applied exactly to control these properties of the GridGroupingControl. You can get the desired style using the following code snippet.

Me.GridGroupingControl1.TableDescriptor.Columns(1).Appearance.AnyRecordFieldCell.CellType = "mytype"

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

This page will automatically be redirected to the 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