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 working on this control. I had few questions related with control. Hopefully you will be able to answer them.
1. If I want to change the color of the selected row in this control how should I do that. Default it is showing me orange color. I would like it to change to blue 2. If I want to change the text color of elements in the selected row , how do I do that. Default color it is showing me white. I would like it to turn to black . 3. The group header when clicked turns to color black. Is it possible to change the color of it?
Are there any properties or functions I need to setup?
NANisha Arockiya A Syncfusion Team September 29, 2008 12:59 PM UTC
Hi Anuvrat,
Thanks for your interest in Syncfusion Products.
Query 1:
You have to include the Alphablend flag in the Allowselection property. To control the selection color better, you can turn off the color in alhablend selection color and handle PrepareViewStyleInfo. Here is some code snippet:
// In Form Load this.gridGroupingControl1.TableModel.Options.AlphaBlendSelectionColor = Color.FromArgb(0,0,0,0); this.gridGroupingControl1.TableModel.Options.AllowSelection = (Syncfusion.Windows.Forms.Grid.GridSelectionFlags.Row | Syncfusion.Windows.Forms.Grid.GridSelectionFlags.AlphaBlend);
Handle the same PrepareViewStyleInfo as above and set the text color of the selected row. e.Style.TextColor = Color.Black;
Query 3:
Inorder to change the color or the group header,Please try this code snippet and let us know if this helps. private void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e) { if(e.TableCellIdentity.TableCellType==GridTableCellType.GroupCaptionCell) { e.Style.TextColor=Color.Red; } }