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

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

Platform: UWP |
Control: SfDataGrid |
Published Date: January 22, 2016 |
Last Revised Date: February 5, 2016 |
Product Version: 12.4.0.24

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

 

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

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