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

Top border missing for VisualStudio2012DarkTheme

1 Answer 101 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 1
Iron
Sean asked on 03 Mar 2021, 09:30 PM

     Hello,

When using a VisualStudio2012Dark themed GridView with ColumnHeader, GroupPanel, and AddNewRow turned off, the top border of the grid is missing. It only appears with a border width that is greater than 1.

To reproduce:

  1. Drop a RadGridView into a new form
  2. Change the form's theme to VisualStudio2012DarkTheme. Apply to all controls.
  3. Add the following to the form's load event
RadGridView1.ShowColumnHeaders = False
RadGridView1.ShowGroupPanel = False
RadGridView1.AllowAddNewRow = False
 
RadGridView1.Columns.Add("1")
RadGridView1.Columns.Add("2")
RadGridView1.Columns.Add("3")
 
RadGridView1.Rows.Add(1, 2, 3)
RadGridView1.Rows.Add(4, 5, 6)
RadGridView1.CurrentRow = Nothing
 
RadGridView1.TableElement.DrawBorder = True
RadGridView1.TableElement.BorderBoxStyle = Telerik.WinControls.BorderBoxStyle.SingleBorder
RadGridView1.TableElement.BorderGradientStyle = Telerik.WinControls.GradientStyles.Solid
RadGridView1.TableElement.BorderColor = Color.Yellow
RadGridView1.TableElement.BorderWidth = 1

 

I'm not sure if that is part of the theme, but either way I can't seem to add a single pixel border to the top.

 

Also, the description for TableElement.BorderWidth is incorrect; it says it is for the left border.

 

This is for R3 2018.

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 04 Mar 2021, 12:01 PM

Hello, Sean,

According to the provided information, it seems that you customize the default style offered by the VisualStudio2012Dark theme. 

In order to display the top border for the TableElement when you enable it, feel free to add 1px top margin by setting the TableElement.Margin to Padding(0, 1, 0, 0). The obtained result is illustrated below:

As to the BorderWidth description, we will update it with the correct description. I have also updated your Telerik points for reporting this.

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
GridView
Asked by
Sean
Top achievements
Rank 1
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or