We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Not show selected cell border in SfDataGrid cell

Thread ID:





127644 Nov 30,2016 08:31 AM UTC Dec 2,2016 02:11 AM UTC WPF 3
Tags: SfDataGrid
Somanna Chottekalapanda
Asked On November 30, 2016 08:31 AM UTC

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" />

  • Grid definition
<syncfusion:SfDataGrid AddNewRowPosition="None"
                               ItemsSource="{Binding Path=CashPositions,
                <syncfusion:SortColumnDescription ColumnName="PositionId" />
                <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}},
                                              MappingName="QuantityToAggregate" />
                <syncfusion:GridCheckBoxColumn AllowEditing="True"
                                               HeaderText="Select to Aggregate"
                                               IsHidden="{Binding RelativeSource={RelativeSource Mode=FindAncestor,
                                                                                                 AncestorType={x:Type UserControl}},
                                               MappingName="SelectedToAggregate" />
                <!--  CashAccountAggregations  -->
                <syncfusion:GridViewDefinition RelationalColumn="CashAccountAggregations">
                        <syncfusion:SfDataGrid AllowDeleting="False"
                                <syncfusion:GridTextColumn HeaderText="Account Id" MappingName="AccountId" />
                                <syncfusion:GridTextColumn HeaderText="Existing Quantity" MappingName="ExistingQuantity" />
                                <syncfusion:GridTextColumn HeaderText="Booking Quantity" MappingName="BookingQuantity" />

Attachment: SfDataGridSelectedCellBorder_504af149.zip

Sivakumar R [Syncfusion]
Replied On 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. 

Somanna Chottekalapanda
Replied On December 1, 2016 09:24 AM UTC

That worked. Thanks Sivakumar.

Srinivasan Vasu [Syncfusion]
Replied On December 2, 2016 02:11 AM UTC

Hi Somanna, 
Thanks for your update. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon