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.

Grid Line style

Thread ID:





131228 Jun 29,2017 08:37 AM Jul 4,2017 09:21 AM UWP 1
Tags: SfTreeGrid
Asked On June 29, 2017 08:37 AM

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 09:21 AM

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.

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.