The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
ADAdministrator Syncfusion Team 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. http://www.syncfusion.com/Support/user/uploads/GroupingStyles_5acc96a0.zip
Best Regards, Haneef
ADAdministrator Syncfusion Team 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"
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.