I want to display a lot of rows in my RadGridView so therefor I want to make it as compact as possible with little space between the rows. Is there a way to remove the area of the HorizontalGridLines? Setting the HorizontalGridLine height to zero that is.
Best regards,
Anna
11 Answers, 1 is accepted
You may use the GridLinesVisibility property of the grid and set it to None or Vertical in your case. You may take a look at our online demo for a reference.
Maya
the Telerik team

/Anna
You may try to set the RowHeight property of the grid. Generally, the RowHeight is 25 pixels, one of which is devoted to the bottom vertical grid line. Consequently, if this grid line is visible, the space for the row is 24 pixels. So, what I may recommend you is to set the GridLinesVisibility to Horizontal and set the RowHeight to "24".
Let me know if it meets your requirements.
Kind regards,
Maya
the Telerik team

// Anna
Based on your requirements defined in the last but one post of yours, I get the impression that you want to minimize the space between the rows so that your grid looks as compact as possible. Generally, using the two properties - GridLinesVisibility and RowHeight should do the trick. I am sending you a sample project illustrating the proposed solution. You may set the RowHeight property to a value that will visualize the rows just as you want.
However, if still this is not the solution you are looking for, I would need quite more details as otherwise my hands are tied.
Maya
the Telerik team

What I really want is to be able to set the horizontal GridLinesVisibility to collapsed instead of just hidden. Since this is not possible I set the padding of the GridViewCell to 0 to get the compact look I´m after. But thanx anyway for the help.
Best regards,
Anna Rudlund

GridViewRow has a property HorizontalGridLinesWidth. Is it not possible to change this value?
Best regards,
Anna
Basically, the HorizontalGridLinesWidth property is used only for internal needs and it is not meant for being set explicitly. Still, it is visible as otherwise it will not be possible to be used in the definition of the templates.
Maya
the Telerik team

<Style x:Key="MyStyle" TargetType="{x:Type telerik:GridViewCell}">
<Setter Property="Background"> <Setter.Value>#FF0094D3</Setter.Value> </Setter>
<Setter Property="Padding" Value="5" />
<Setter Property="Margin" Value="0,10,0,0" />
</Style>
Thanks for your help.
You may define a style for the GridViewRow:
<
Style
TargetType
=
"telerik:GridViewRow"
>
<
Setter
Property
=
"Background"
Value
=
"Tomato"
/>
</
Style
>
I am sending you a sample project illustrating the proposed solution. Let me know whether it corresponds to your requirements.
Maya
the Telerik team
