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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to show the selection of row/cell when setting the background for SfDataGrid GridCell?

Problem

Row/Cell selection border is behind the GridCell content. So when you apply the background for GridCell, the selection is not displayed in UI.

The following code example shows you how to set the GridCell style.

XAML

In the following screenshot, the selection is set in the 5th row, but it is not displayed in View with the selection border in the Cell Content presenter.

Figure 1: 5th Row Selection

Solution

You can overcome this problem by reducing the Opacity for the brush that you set to the GridCell background. The following code example shows you how to set the Opacity to GridCell.

XAML

The following screenshot shows you the selection of row after applying background for GridCell also.

Figure 2: selection of row after applying background

 

Sample Links:

WPF

WRT

SilverLight

UWP

Article ID: Published Date: Last Revised Date: Platform: Control: .NET Framework: Product Version:
3183 01/12/2015 01/22/2016 Silverlight SfDataGrid 4.5 12.3.0.36
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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