Can't remove borders around GridView Rows

1 Answer 283 Views
GridView Styling
loic
Top achievements
Rank 1
Iron
loic asked on 08 Sep 2021, 02:58 PM | edited on 08 Sep 2021, 02:58 PM

Hello, I can't find how to remove the border around the rows in my radgridview as shown in the screen shot

The first row is bordered in gray and the row which is moused over is bordered in orange

Here's the code for the radgridview with a column and the code for my row style :


<Grid Grid.Row="2" Grid.Column="1" Background="White" >
                <!-- Calibrators TAB -->
                <Grid x:Name="TabCalibrators" Visibility="Visible">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="775px"></RowDefinition>
                    </Grid.RowDefinitions>
                    <!--<Rectangle Width="500px" Height="2" Fill="White" HorizontalAlignment="Center" VerticalAlignment="Top"/>-->
                    <Border x:Name="BDRoundedCalibrators" Background="{StaticResource Zentech_DarkGray}" BorderThickness="0" BorderBrush="{x:Null}" CornerRadius="0,0,12,0"/>
                    <Line X1="0" Y1="0" Stroke="White" StrokeThickness="2" X2="1735" Y2="0" Grid.Row="0"/>
                    <telerik:RadGridView x:Name="GridCalibrators"
                            BorderBrush="Transparent"
                            BorderThickness="0"
                            AutoGenerateColumns="False"
                            IsReadOnly="True" 
                            CanUserSelect="False"
                            GridLinesVisibility="None" 
                            CanUserReorderColumns="False" 
                            CanUserSortColumns="False" 
                            Background="White"  
                            CanUserSelectColumns="False"
                            ShowGroupPanel="False"        
                            CanUserDeleteRows="False"  
                            CanUserResizeColumns="False" 
                            CanUserResizeRows="False"  
                            RowIndicatorVisibility="Collapsed" 
                            CanUserFreezeColumns="False" 
                            ShowSearchPanel="False"
                            ShowColumnSortIndexes="False"
                            MergedCellsDirection="Vertical"
                            GroupRenderMode="Flat"
                            CanUserSearch="False"
                            CanUserSortGroups="False"
                            IsFilteringAllowed="False"
                            ReorderColumnsMode="None"
                            IsManipulationEnabled="False"
                            HeaderRowStyle="{StaticResource RadGridViewColumnHeaderStyle}"
                            RowStyle="{StaticResource RadGridViewRow_Standard}"
                            Grid.Row="0"
                            >
                        <!--RowStyle="{StaticResource RadGridViewRow_Standard}"-->
                        <telerik:RadGridView.OpacityMask>
                            <VisualBrush Visual="{Binding ElementName=BDRoundedCalibrators}"/>
                        </telerik:RadGridView.OpacityMask>
                        <telerik:RadGridView.Resources>
                            <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#FFFFFF"/>
                            <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="#5D6467"/>
                            <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="#FFFFFF"/>
                            <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="#5D6467"/>
                        </telerik:RadGridView.Resources>
                        <telerik:RadGridView.Columns>
                            
                            <!-- Status -->
                            <telerik:GridViewDataColumn Header="Status" Width="175" 
                                                        HeaderCellStyle="{StaticResource RadGridViewHeaderCellStyle}" 
                                                        DataMemberBinding="{Binding WellStatus}"
                                                        IsCellMergingEnabled="False"
                                                        HeaderTextAlignment="Center"
                                                        CellStyle="{StaticResource ViewCellStyle}">
                                <telerik:GridViewDataColumn.CellTemplate>
                                    <DataTemplate>
                                        <StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" >
                                            <Image x:Name="IconStatus" Height="37" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="10,0,0,0">
                                                <Image.Style>
                                                    <Style TargetType="{x:Type Image}">
                                                        <Style.Triggers>
                                                            <DataTrigger Value="Completed" Binding="{Binding WellStatus}">
                                                                <Setter Property="Source" Value="{StaticResource AssayApproval_IconCompleted}"/>
                                                            </DataTrigger>
                                                            <DataTrigger Value="Processing" Binding="{Binding WellStatus}">
                                                                <Setter Property="Source" Value="{StaticResource AssayApproval_IconProcessing}"/>
                                                            </DataTrigger>
                                                            <DataTrigger Value="Aborted" Binding="{Binding WellStatus}">
                                                                <Setter Property="Source" Value="{StaticResource AssayApproval_IconAborted}"/>
                                                            </DataTrigger>
                                                        </Style.Triggers>
                                                    </Style>
                                                </Image.Style>
                                            </Image>
                                            <TextBlock Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0,0,0" Text="{Binding WellStatus}"/>
                                        </StackPanel>
                                    </DataTemplate>
                                </telerik:GridViewDataColumn.CellTemplate>
                            </telerik:GridViewDataColumn>

                            <telerik:GridViewPinRowColumn MinWidth="0" Width="1" HeaderCellStyle="{StaticResource RadGridViewColumnSeparatorSmallStyle}" />

                            <!--PlateSerialNumber-->
                            <telerik:GridViewDataColumn  Header="Plate serial number" Width="180" 
                                                         HeaderCellStyle="{StaticResource RadGridViewHeaderCellStyle}" 
                                                         DataMemberBinding="{Binding PlateBarcode}"
                                                         IsCellMergingEnabled="False"
                                                         TextAlignment="Center"/>

 


    <Style x:Key="RadGridViewRow_Standard" TargetType="{x:Type telerik:GridViewRow}" >
        <Setter Property="Background" Value="White"/>
        <Setter Property="Foreground" Value="{StaticResource Zentech_DarkGray}"/>
        <Setter Property="TextElement.FontFamily" Value="{StaticResource PrimaryFont}"/>
        <Setter Property="TextElement.FontSize" Value="16pt"/>
        <Setter Property="Height" Value="65"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="MouseOverBackground" Value="Transparent"/>
        <Setter Property="SelectedBackground" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="{StaticResource Zentech_DarkGray}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="IsSelected" Value="False"/>
        <Setter Property="IsManipulationEnabled" Value="False"/>
    </Style>

1 Answer, 1 is accepted

Sort by
0
Stenly
Telerik team
answered on 10 Sep 2021, 12:15 PM

Hello Ioic,

I have prepared a sample project, but I was not able to make it look like in the provided image. That said, could you edit the attached project, to match, as close as possible, the one from the image?

Regards,
Stenly
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 Styling
Asked by
loic
Top achievements
Rank 1
Iron
Answers by
Stenly
Telerik team
Share this question
or