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.
I am trying to set the color of a column in the grouping grid based on the header text for that column. I loop through all the columns in the grid as follows and I use ColStyles[a] to set the color based on the header as below. However, the color is not getting set after the loop is over.
for (int a =0; a
ADAdministrator Syncfusion Team April 6, 2006 07:31 AM UTC
Hi Vijay,
Please try the below code to set the color of a column in the GroupingGridControl based on the header text.
for (int a =0; a
VSVijay SagarApril 7, 2006 11:55 AM UTC
Thanks. It works.
>Hi Vijay,
>
>Please try the below code to set the color of a column in the GroupingGridControl based on the header text.
>
>for (int a =0; a{
>
>if (this.gdcMetaData.TableDescriptor.Columns[a].HeaderText.StartsWith("Full Mapping"))
>this.gdcMetaData.TableDescriptor.Columns[a].Appearance.AnyRecordFieldCell.BackColor = Color.LightGoldenrodYellow;
>else if (this.gdcMetaData.TableDescriptor.Columns[a].HeaderText.StartsWith("Source Mapping"))
>this.gdcMetaData.TableDescriptor.Columns[a].Appearance.AnyRecordFieldCell.BackColor = Color.LightSeaGreen;
>else if (this.gdcMetaData.TableDescriptor.Columns[a].HeaderText.StartsWith("Complex Mapping"))
>this.gdcMetaData.TableModel.ColStyles[a].BackColor = Color.LightPink;
>else if (this.gdcMetaData.TableDescriptor.Columns[a].HeaderText.StartsWith("Source Mapping"))
>this.gdcMetaData.TableDescriptor.Columns[a].Appearance.AnyRecordFieldCell.BackColor = Color.LightSkyBlue;
>}
>
>Regards,
>Calvin.
Need More Help?
Get personalized assistance from our support team.