Hello Abbas,
Thank you for contacting Telerik support.
In order to change the color of the header row, you need to subscribe to the
ViewCellFormatting event and apply the style you desire. Please refer to the code snippet below how to achieve it:
In order to prevent applying the formatting to other columns' cell elements, all customization should be reset for the rest of the cell elements when you use events like ViewCellFormatting and CellFormatting.
The easiest way to customize the appearance of
RadScrollBar is to use our theming mechanism through the
Visual Style Builder. Otherwise, you have to navigate through the
Element hierarchy tree of the scroll bars in order to find the element responsible for the desired customization. Here is an example for changing the colors of the scrollbars:
radGridView1.TableElement.VScrollBar.FillElement.BackColor = Color.LightGray;
radGridView1.TableElement.VScrollBar.FillElement.NumberOfColors = 1;
radGridView1.TableElement.VScrollBar.FillElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
radGridView1.TableElement.VScrollBar.FirstButton.ButtonFill.BackColor = Color.DarkGray;
radGridView1.TableElement.VScrollBar.FirstButton.ButtonFill.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
radGridView1.TableElement.VScrollBar.SecondButton.ButtonFill.BackColor = Color.DarkGray;
radGridView1.TableElement.VScrollBar.SecondButton.ButtonFill.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
radGridView1.TableElement.VScrollBar.ThumbElement.ThumbFill.BackColor = Color.LightCyan;
radGridView1.TableElement.VScrollBar.ThumbElement.ThumbFill.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
radGridView1.TableElement.HScrollBar.FillElement.BackColor = Color.LightCoral;
radGridView1.TableElement.HScrollBar.FillElement.NumberOfColors = 1;
radGridView1.TableElement.HScrollBar.FillElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
radGridView1.TableElement.HScrollBar.FirstButton.ButtonFill.BackColor = Color.LightCoral;
radGridView1.TableElement.HScrollBar.FirstButton.ButtonFill.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
radGridView1.TableElement.HScrollBar.SecondButton.ButtonFill.BackColor = Color.LightCoral;
radGridView1.TableElement.HScrollBar.SecondButton.ButtonFill.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
I hope this helps. Let me know if you need anything else.
Regards,
Ralitsa
Telerik by Progress
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this
blog post and share your thoughts.