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

Grid Line style

Thread ID:

Created:

Updated:

Platform:

Replies:

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

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

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"> 
                    <Setter.Value> 
                        <ControlTemplate TargetType="syncfusion:TreeGridCell"> 
                            <Grid x:Name="Root" 
                          Background="{TemplateBinding Background}" 
                          BorderBrush="{TemplateBinding BorderBrush}" 
                          BorderThickness="{TemplateBinding BorderThickness}"> 
                                <VisualStateManager.VisualStateGroups> 
                                    <VisualStateGroup x:Name="IndicationStates"> 
                                        <VisualState x:Name="NoError" /> 
                                        <VisualState x:Name="HasError"> 
                                            <VisualState.Setters> 
                                                <Setter Target="PART_InValidCellBorder.Visibility" Value="Visible" /> 
                                            </VisualState.Setters> 
                                        </VisualState> 
                                    </VisualStateGroup> 
 
                                    <VisualStateGroup x:Name="CurrentStates"> 
                                        <VisualState x:Name="Regular" /> 
                                        <VisualState x:Name="Current"> 
                                            <VisualState.Setters> 
                                                <Setter Target="PART_CurrentCellBorder.Visibility" Value="Visible" /> 
                                            </VisualState.Setters> 
                                        </VisualState> 
                                    </VisualStateGroup> 
                                </VisualStateManager.VisualStateGroups> 
                       
                                 
                                <Rectangle  Stroke="Red" StrokeThickness="1" 
                                            StrokeDashArray="4 2"   
                                            VerticalAlignment="Stretch"  
                                            HorizontalAlignment="Stretch"> 
                                </Rectangle> 
                                <ContentPresenter /> 
 
                                <Border x:Name="PART_CurrentCellBorder" 
                                Background="Transparent" 
                                BorderBrush="{TemplateBinding CurrentCellBorderBrush}" 
                                BorderThickness="{TemplateBinding CurrentCellBorderThickness}" 
                                IsHitTestVisible="False" 
                                Visibility="Collapsed" /> 
                                <Border x:Name="PART_InValidCellBorder" 
                                Width="10" 
                                Height="10" 
                                HorizontalAlignment="Right" 
                                VerticalAlignment="Top" 
                                Visibility="Collapsed"> 
                                    <ToolTipService.ToolTip> 
 
                                        <ToolTip Background="#FFDB000C" 
                                         Placement="Right" 
                                         Tag="{TemplateBinding ErrorMessage}" 
                                         Template="{StaticResource ValidationToolTipTemplate}" /> 
 
                                    </ToolTipService.ToolTip> 
                                    <Path Data="M0.5,0.5 L12.652698,0.5 12.652698,12.068006 z" 
                                  Fill="Red" 
                                  Stretch="Fill" /> 
                                </Border> 
                            </Grid> 
                        </ControlTemplate> 
                    </Setter.Value> 
                </Setter> 
 
            </Style> 
  
Regards, 
Jai Ganesh S 


CONFIRMATION

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.

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

;