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

GridView borders

3 Answers 228 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Potecaru Tudor
Top achievements
Rank 1
Potecaru Tudor asked on 03 Jun 2010, 09:12 AM
Hello Telerik. I've encountered a problem while styling the GridView component. As you can see from the attached image, there are some black borders around the header cells and around the row content as well, that i want to remove. Hope you can help me with this. Thank you  

3 Answers, 1 is accepted

Sort by
0
Potecaru Tudor
Top achievements
Rank 1
answered on 04 Jun 2010, 09:16 AM
<ResourceDictionary>  
            <Style x:Key="RadGridViewRowStyle" TargetType="{x:Type telerik:GridViewRow}">  
                <Setter Property="Background" Value="White"/>  
                <Setter Property="BorderThickness" Value="0"/>  
            </Style>  
            <Style x:Key="RadGridViewAlternateRowStyle" TargetType="{x:Type telerik:GridViewRow}">  
                <Setter Property="Background" Value="#ffebf7fc"/>  
                <Setter Property="BorderThickness" Value="0"/>  
            </Style>  
            <Style x:Key="RadGridViewStyle" TargetType="{x:Type telerik:RadGridView}">  
                <Style.Resources>  
                    <Style TargetType ="{x:Type telerik:GridViewHeaderCell}">  
                        <Setter Property="Background">  
                            <Setter.Value>  
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">  
                                    <GradientStop Color="#ffe1ecf4" Offset="0"/>  
                                    <GradientStop Color="#ffb3cadc" Offset="1"/>  
                                </LinearGradientBrush>  
                            </Setter.Value>  
                        </Setter>  
                        <Setter Property="BorderThickness" Value="0"/>  
                        <Setter Property="Foreground" Value="#ff24457b"/>  
                    </Style>  
                    <Style TargetType="{x:Type telerik:GridViewScrollViewer}">  
                        <Setter Property="BorderThickness" Value="0"/>  
                        <Setter Property="Background" Value="{x:Null}"/>  
                    </Style>  
                </Style.Resources>  
                <Setter Property="AlternationCount" Value="2"/>  
                <Setter Property="RowStyle" Value="{StaticResource RadGridViewRowStyle}"/>  
                <Setter Property="AlternateRowStyle" Value="{StaticResource RadGridViewAlternateRowStyle}"/>  
                <Setter Property="GridLinesVisibility" Value="None"/>  
                <Setter Property="IsReadOnly" Value="True"/>  
                <Setter Property="AutoGenerateColumns" Value="False"/>  
                <Setter Property="DataLoadMode" Value="Asynchronous"/>  
                <Setter Property="ScrollMode" Value="Deferred"/>  
                <Setter Property="HorizontalAlignment" Value="Stretch"/>  
                <Setter Property="ItemsSource" Value="{Binding}"/>  
                <Setter Property="RowIndicatorVisibility" Value="Collapsed"/>  
                <Setter Property="BorderThickness" Value="0"/>  
                <Setter Property="Foreground" Value="#FF575757"/>  
                <Setter Property="GroupPanelBackground" Value="White"/>  
                <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden"/>  
            </Style>  
        </ResourceDictionary> 

Any help on this? I posted the code maybe it might give you a clue.

0
Potecaru Tudor
Top achievements
Rank 1
answered on 07 Jun 2010, 08:43 AM
No help on this thread? :(
0
Kalin Milanov
Telerik team
answered on 09 Jun 2010, 07:21 AM
Hello Potecaru Tudor,

What you see on the left side of your grid (I am referring to the screenshot provided) is the frozen column splitter which you can remove by setting the CanUserFreezeColumns to False.

As for the header of the grid - you will need to edit the template of the HeaderCell as our styles consists of two nested borders. The black ones you see there are in fact the inner border of the HeaderCell. Removing those should solve the issue you are having.

Let me know if you need any assistance with those tasks.

Greetings,
Kalin Milanov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
Potecaru Tudor
Top achievements
Rank 1
Answers by
Potecaru Tudor
Top achievements
Rank 1
Kalin Milanov
Telerik team
Share this question
or