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 remove COLUMN and ROW seperator lines

Thread ID:

Created:

Updated:

Platform:

Replies:

128939 Feb 17,2017 01:12 AM UTC Feb 20,2017 04:32 AM UTC Xamarin.Forms 4
loading
Tags: SfDataGrid
Emil
Asked On February 17, 2017 01:12 AM UTC

Is it possible to remove column and Row lines using customlayout?  

Emil
Replied On February 17, 2017 01:37 AM UTC

here is how my datagrid looks like

<sfgrid:SfDataGrid ScrollingMode="PixelLine"
                          x:Name="dataGrid"
                          IsEnabled="True"
                          AutoGenerateColumns="False"
                          AllowSorting="True"
                          AllowDraggingColumn="False"
                          AllowDraggingRow="True"
                          ColumnSizer="Star"
                          RowHeight="80"
                          MaxSwipeOffset="180"
                          AllowSwiping="True"
                          GridTapped="dataGrid_GridTapped"
                          SelectionMode="Single"   ItemsSource="{Binding  OrdersInfo}"
                          SelectedItem="{Binding SelectedItem}">
          <sfgrid:SfDataGrid.HeaderRowHeight>
            <OnPlatform Android="40"
                                  WinPhone="50"
                                  iOS="40"
                                  x:TypeArguments="x:Double" />
          </sfgrid:SfDataGrid.HeaderRowHeight>
          <sfgrid:SfDataGrid.Columns x:TypeArguments="sfgrid:Columns">


            <sfgrid:GridTemplateColumn HeaderFontAttribute="Bold"
                                   HeaderText="Customer Name"
                                   MappingName="FirstName">
              <sfgrid:GridTemplateColumn.HeaderCellTextSize>
                <OnIdiom Phone="12"
                         Tablet="15"
                         x:TypeArguments="x:Double" />
              </sfgrid:GridTemplateColumn.HeaderCellTextSize>
              <sfgrid:GridTemplateColumn.CellTemplate>
                <DataTemplate>
                  <Frame  OutlineColor="Silver" HasShadow="True" Margin="10,5" Padding="1">
                    <Grid ColumnSpacing="5" RowSpacing="5"   HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"  InputTransparent="True">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.5*"></ColumnDefinition>
                        <ColumnDefinition Width="*"></ColumnDefinition>
                        <ColumnDefinition Width="*"></ColumnDefinition>
                      </Grid.ColumnDefinitions>
                      <Grid.RowDefinitions>
                        <RowDefinition Height="*"></RowDefinition>
                        <RowDefinition Height="*"></RowDefinition>
                      </Grid.RowDefinitions>
                      
                      <Label   Margin="5,0" Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" LineBreakMode="WordWrap" Text="test3" Style="{StaticResource NameStyle}"/>
                      <Label   Grid.Row="1" Grid.Column="1"  Text="test1" Style="{StaticResource lblStyle}"/>
                      <Label   Grid.Row="1" Grid.Column="2"  Text="test2" Style="{StaticResource lblStyle}"/>
                    </Grid>
                  </Frame>
                </DataTemplate>
              </sfgrid:GridTemplateColumn.CellTemplate>
            </sfgrid:GridTemplateColumn>

          </sfgrid:SfDataGrid.Columns> 

     
        </sfgrid:SfDataGrid>
    

Sivaraman Sivagurunathan [Syncfusion]
Replied On February 17, 2017 12:59 PM UTC

Hi Emil Alipiev,

Thanks for contacting Syncfusion Support.
 

We have checked your query. You can achieve your requirement to hide the borders in SfDataGrid by writing a custom GridStyle class derived from DataGridStyle. You need to override the GetGridLinesVisbility method to remove the column and row separator lines.

 
public class CustomGridStyle : DataGridStyle 
{ 
    public CustomGridStyle() 
    { 
    } 
    public override GridLinesVisibility GetGridLinesVisibility() 
    { 
        return GridLinesVisibility.None; 
    } 
} 

We have prepared a sample based on your requirement and you can download the same from the below link.
 

Sample Link:
http://www.syncfusion.com/downloads/support/forum/128939/ze/Sample_Demo-2018589961 

Regards,
Sivaraman S
 


Emil
Replied On February 18, 2017 02:04 AM UTC

awsome that works fine

Ashok N [Syncfusion]
Replied On February 20, 2017 04:32 AM UTC

Hi Emil , 
 
Thanks for your reply. Please let us know if you require further assistance on this. 
 
Regards, 
Ashok 


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

;