This is a migrated thread and some comments may be shown as answers.

Gridline Colors/Configuration

4 Answers 54 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Marco
Top achievements
Rank 1
Marco asked on 19 Sep 2018, 11:07 AM

 

Sorry if this is a bad question but I want to configure the grid lines in the RadGridView. This Post https://www.telerik.com/forums/change-color-of-the-grid---radgridview says I have to use Visual Style Builder and edit the theme.... Do I really have to dig into this massive thing?! Thats a total overload...? All I want is to configure the grid lines?

4 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 19 Sep 2018, 11:54 AM
Hi Marco,

This is valid only if you want to change the hot tracking (MouseOver) styles. The styles for the MouseOver state should be changed in theme and there are no events that allow you to change this in the code. For other cases, you can just use the formatting events: Formatting Cells.

I hope this will be useful. Let me know if you have additional questions.

Regards,
Dimitar
Progress Telerik
Get quickly onboard and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Marco
Top achievements
Rank 1
answered on 20 Sep 2018, 06:58 AM

Hi Dimitar

That was helpful. I could at least remove the "inner" borders. Is there a way to remove the row-header borders too?

Regards,
Marco

0
Accepted
Dimitar
Telerik team
answered on 20 Sep 2018, 12:04 PM
Hello Marco,

Change the event to ViewCellFormatting which is fired for non-data cells. Here is an example as well:
private void RadGridView1_ViewCellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
{
    if (e.Row is GridViewDataRowInfo)
    {
        e.CellElement.DrawBorder = false;
    }
    else
    {
        e.CellElement.ResetValue(LightVisualElement.DrawBorderProperty, Telerik.WinControls.ValueResetFlags.Local);
    }
  
}

Should you have any other questions do not hesitate to ask.

Regards,
Dimitar
Progress Telerik
Get quickly onboard and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Marco
Top achievements
Rank 1
answered on 21 Sep 2018, 08:46 AM

Works nicely!

thank you very much

Tags
GridView
Asked by
Marco
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Marco
Top achievements
Rank 1
Share this question
or