Hello,
I need to remove GridView's header row border partially to display only right and bottom sides(Grid.png). I've tried to style HeaderRow and HeaderCell but it does not help so the whole border is seen. Any idea how can I achieve that? Here is my styles
I need to remove GridView's header row border partially to display only right and bottom sides(Grid.png). I've tried to style HeaderRow and HeaderCell but it does not help so the whole border is seen. Any idea how can I achieve that? Here is my styles
<
Style
x:Key
=
"gridheaderstyle"
TargetType
=
"telerik:GridViewHeaderRow"
>
<
Setter
Property
=
"BorderBrush"
Value
=
"Transparent"
/>
<
Setter
Property
=
"BorderThickness"
Value
=
"0 0 0 0"
/>
<
Setter
Property
=
"Background"
Value
=
"Transparent"
/>
</
Style
>
<
Style
x:Key
=
"gridheadercellstyle"
TargetType
=
"telerik:GridViewHeaderCell"
>
<
Setter
Property
=
"Background"
Value
=
"Transparent"
/>
<
Setter
Property
=
"BorderBrush"
Value
=
"Black"
/>
<
Setter
Property
=
"BorderThickness"
Value
=
"0 0 1 1"
/>
</Style>
6 Answers, 1 is accepted
0
Hi Tigran,
Thank you for contacting us.
Which Telerik theme are you currently using?
Based on this information I will prepare sample demo, which illustrates how to achieve your goal.
Regards,
Vanya Pavlova
Telerik
Thank you for contacting us.
Which Telerik theme are you currently using?
Based on this information I will prepare sample demo, which illustrates how to achieve your goal.
Regards,
Vanya Pavlova
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
0
Tigran
Top achievements
Rank 1
answered on 18 Aug 2014, 07:20 PM
Hello Vanya,
I'm using default theme. Thank you for response.
I'm using default theme. Thank you for response.
0
Hello Tigran,
Thank you for getting back to us.
In the default themes, GridViewHeaderCell and GridViewHeaderRow elements have outer and inner borders. With a simple style you could remove only the outer borders, not the inner ones.
You should predefine their templates and remove the inner borders in order to achieve your goal.
I've prepared sample demo, which illustrates this approach against Office_Black theme.
Regards,
Vanya Pavlova
Telerik
Thank you for getting back to us.
In the default themes, GridViewHeaderCell and GridViewHeaderRow elements have outer and inner borders. With a simple style you could remove only the outer borders, not the inner ones.
You should predefine their templates and remove the inner borders in order to achieve your goal.
I've prepared sample demo, which illustrates this approach against Office_Black theme.
Regards,
Vanya Pavlova
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
0
0
Accepted
Hi Tigran,
Thank you for getting back to us.
The referred example demonstrates how to remove the inner borders of GridViewHeaderCell and GridViewHeaderRow. If you want to reset the border thickness to the left you should alter the BorderThickness of GridViewHeaderRow:
RadGridView's definition should be modified, as well:
You could check the updated project and image for further reference.
Could you clarify how this corresponds to your needs?
Regards,
Vanya Pavlova
Telerik
Thank you for getting back to us.
The referred example demonstrates how to remove the inner borders of GridViewHeaderCell and GridViewHeaderRow. If you want to reset the border thickness to the left you should alter the BorderThickness of GridViewHeaderRow:
<
Style
x:Key
=
"GridViewHeaderRowStyle"
TargetType
=
"grid:GridViewHeaderRow"
>
<
Setter
Property
=
"Template"
Value
=
"{StaticResource GridViewHeaderRowTemplate}"
/>
<
Setter
Property
=
"Background"
Value
=
"White"
/>
<
Setter
Property
=
"MinHeight"
Value
=
"27"
/>
<
Setter
Property
=
"BorderBrush"
Value
=
"Black"
/>
<
Setter
Property
=
"BorderThickness"
Value
=
"0 0 0 1"
/>
RadGridView's definition should be modified, as well:
<
telerik:RadGridView
ShowGroupPanel
=
"False"
CanUserFreezeColumns
=
"False"
BorderThickness
=
"0"
RowIndicatorVisibility
=
"Collapsed"
IsFilteringAllowed
=
"False"
GridLinesVisibility
=
"None"
ItemsSource
=
"{Binding Collection}"
/>
You could check the updated project and image for further reference.
Could you clarify how this corresponds to your needs?
Regards,
Vanya Pavlova
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
0
Tigran
Top achievements
Rank 1
answered on 19 Aug 2014, 10:43 AM
Hi Vanya,
Now everything is clear, this is what I need. Thank you very much for your help !
Now everything is clear, this is what I need. Thank you very much for your help !