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.
Unfortunately, activation email could not send to your email. Please try again.

How to set the AlternatingRowStyle to TextBox which is directly loaded into GridTemplateColumn?

SfDataGrid.AlternatingRowStyle property helps you to apply styles for the alternate rows in SfDataGrid. When you set the SfDataGrid.AlternatingRowStyle, the style is not applied to TextBox that is directly loaded into GridTemplateColumn as displayed in the following screenshot.

D:\Issuesample\KB's\templatestyle\FL1.png

You can overcome this by setting the TextBox Background as Transparent that is loaded in GridTemplateColumn.

The following code example explains the SfDataGrid is defined with AlternatingRowStyle and GridTemplateColumn is defined with TextBox.

XML

 

The following screenshot displays the output of SfDataGrid with AlternatingRowStyle. Here, the TextBox is loaded to the Employee name column.

D:\Issuesample\KB's\templatestyle\LS2.png

Sample Links,

WPF

WRT

SilverLight

UWP

 

Article ID: Published Date: Last Revised Date: Platform: Control: Product Version:
3650 01/30/2015 02/05/2016 WinRT SfDataGrid 12.4.0.24
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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.