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

Grid Line style

Thread ID:





131228 Jun 29,2017 12:37 PM UTC Jul 4,2017 01:21 PM UTC UWP 1
Tags: SfTreeGrid
Asked On June 29, 2017 12:37 PM UTC

How can i change the grid line style for sfTreeGrid . For example i wanted to change vertical grid lines to doted lnes
Thanks & Regards

Jai Ganesh S [Syncfusion]
Replied On July 4, 2017 01:21 PM UTC

Hi Siju, 
You can achieve your requirement for showing a dotted line in SfTreeGrid by writing the style of SfTreeGridCell like below, 
<Style TargetType="syncfusion:TreeGridCell"> 
                <Setter Property="Background" Value="Transparent" /> 
                <Setter Property="BorderThickness" Value="0"/> 
                <Setter Property="Padding" Value="0" /> 
                <Setter Property="Template"> 
                        <ControlTemplate TargetType="syncfusion:TreeGridCell"> 
                            <Grid x:Name="Root" 
                          Background="{TemplateBinding Background}" 
                          BorderBrush="{TemplateBinding BorderBrush}" 
                          BorderThickness="{TemplateBinding BorderThickness}"> 
                                    <VisualStateGroup x:Name="IndicationStates"> 
                                        <VisualState x:Name="NoError" /> 
                                        <VisualState x:Name="HasError"> 
                                                <Setter Target="PART_InValidCellBorder.Visibility" Value="Visible" /> 
                                    <VisualStateGroup x:Name="CurrentStates"> 
                                        <VisualState x:Name="Regular" /> 
                                        <VisualState x:Name="Current"> 
                                                <Setter Target="PART_CurrentCellBorder.Visibility" Value="Visible" /> 
                                <Rectangle  Stroke="Red" StrokeThickness="1" 
                                            StrokeDashArray="4 2"   
                                <ContentPresenter /> 
                                <Border x:Name="PART_CurrentCellBorder" 
                                BorderBrush="{TemplateBinding CurrentCellBorderBrush}" 
                                BorderThickness="{TemplateBinding CurrentCellBorderThickness}" 
                                Visibility="Collapsed" /> 
                                <Border x:Name="PART_InValidCellBorder" 
                                        <ToolTip Background="#FFDB000C" 
                                         Tag="{TemplateBinding ErrorMessage}" 
                                         Template="{StaticResource ValidationToolTipTemplate}" /> 
                                    <Path Data="M0.5,0.5 L12.652698,0.5 12.652698,12.068006 z" 
                                  Stretch="Fill" /> 
Jai Ganesh S 


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

or the page will be automatically redirected to 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