Not show selected cell border in SfDataGrid cell

I am not able to remove the border that is displayed when a cell is selected. I have attached a screenshot.
I have tried to set the SelectionBorderVisibility and CurrentCellBorderVisibility to Collapsed but doesn't change the behavior.
  • Style Definition
<Style TargetType="syncfusion:GridCell">
        <Setter Property="BorderThickness" Value="0.5" />
        <Setter Property="BorderBrush" Value="#646464" />
        <Setter Property="SelectionBorderVisibility" Value="Collapsed" />
        <Setter Property="CurrentCellBorderVisibility" Value="Collapsed" />
</Style>

  • Grid definition
<syncfusion:SfDataGrid AddNewRowPosition="None"
                               AllowDeleting="False"
                               AllowDraggingColumns="False"
                               AllowDrop="False"
                               AllowEditing="False"
                               AllowFiltering="True"
                               AllowGrouping="False"
                               AllowResizingColumns="True"
                               AutoGenerateColumns="False"
                               AutoGenerateRelations="False"
                               Background="Black"
                               ColumnSizer="None"
                               DetailsViewExpanding="SfDataGridOnDetailsViewExpanding"
                               DetailsViewPadding="5"
                               EditTrigger="OnTap"
                               EditorSelectionBehavior="SelectAll"
                               GridValidationMode="InView"
                               ItemsSource="{Binding Path=CashPositions,
                                                     NotifyOnSourceUpdated=True,
                                                     Mode=OneWay}"
                               NavigationMode="Cell"
                               ScrollViewer.HorizontalScrollBarVisibility="Auto"
                               ScrollViewer.VerticalScrollBarVisibility="Auto">
            <syncfusion:SfDataGrid.SortColumnDescriptions>
                <syncfusion:SortColumnDescription ColumnName="PositionId" />
            </syncfusion:SfDataGrid.SortColumnDescriptions>
            <syncfusion:SfDataGrid.Columns>
                <syncfusion:GridTextColumn HeaderText="Position Id" MappingName="PositionId" />
                <syncfusion:GridTextColumn HeaderText="Position Quantity" MappingName="PositionQuantity" />
                <syncfusion:GridNumericColumn AllowEditing="True"
                                              HeaderText="Quantity to Aggregate"
                                              IsHidden="{Binding RelativeSource={RelativeSource Mode=FindAncestor,
                                                                                                AncestorType={x:Type UserControl}},
                                                                 Path=DataContext.IsReadOnly}"
                                              MappingName="QuantityToAggregate" />
                <syncfusion:GridCheckBoxColumn AllowEditing="True"
                                               HeaderText="Select to Aggregate"
                                               IsHidden="{Binding RelativeSource={RelativeSource Mode=FindAncestor,
                                                                                                 AncestorType={x:Type UserControl}},
                                                                  Path=DataContext.IsReadOnly}"
                                               MappingName="SelectedToAggregate" />
            </syncfusion:SfDataGrid.Columns>
            <syncfusion:SfDataGrid.DetailsViewDefinition>
                <!--  CashAccountAggregations  -->
                <syncfusion:GridViewDefinition RelationalColumn="CashAccountAggregations">
                    <syncfusion:GridViewDefinition.DataGrid>
                        <syncfusion:SfDataGrid AllowDeleting="False"
                                               AllowDraggingColumns="False"
                                               AllowDrop="False"
                                               AllowEditing="False"
                                               AllowFiltering="True"
                                               AllowGrouping="False"
                                               AllowResizingColumns="True"
                                               AutoGenerateColumns="False"
                                               AutoGenerateRelations="False"
                                               NavigationMode="Cell">
                            <syncfusion:SfDataGrid.Columns>
                                <syncfusion:GridTextColumn HeaderText="Account Id" MappingName="AccountId" />
                                <syncfusion:GridTextColumn HeaderText="Existing Quantity" MappingName="ExistingQuantity" />
                                <syncfusion:GridTextColumn HeaderText="Booking Quantity" MappingName="BookingQuantity" />
                            </syncfusion:SfDataGrid.Columns>
                        </syncfusion:SfDataGrid>
                    </syncfusion:GridViewDefinition.DataGrid>
                </syncfusion:GridViewDefinition>
            </syncfusion:SfDataGrid.DetailsViewDefinition>
        </syncfusion:SfDataGrid>

Attachment: SfDataGridSelectedCellBorder_504af149.zip

3 Replies

SR Sivakumar R Syncfusion Team November 30, 2016 03:44 PM UTC

Hi Somanna, 
 
Your requirement can be achieved in the below ways, 
 
Way 1: 
You can hide the current cell by setting SfDataGrid.NavigationMode as NavigationMode.Row instead of NavigationMode.Cell. In this case, you can’t edit the cell and also you can navigate between columns. 
 
Way 2: 
If you still need editing and navigation between column, then your requirement can be achieve by setting CurrentCellBorderThickness or CurrentCellBorderBrush property. 
 
Thanks, 
Sivakumar 



SC Somanna Chottekalapanda December 1, 2016 09:24 AM UTC

That worked. Thanks Sivakumar.


SV Srinivasan Vasu Syncfusion Team December 2, 2016 02:11 AM UTC

Hi Somanna, 
  
Thanks for your update. 
  
Regards, 
Srinivasan 


Loader.
Up arrow icon