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

SfDataGrid Printing - Left and right lines

Thread ID:

Created:

Updated:

Platform:

Replies:

123987 May 5,2016 04:38 PM UTC May 9,2016 08:54 AM UTC UWP 3
loading
Tags: SfDataGrid
Michael Woolsey
Asked On May 5, 2016 04:38 PM UTC

Hello,

I've been searching for a way to remove the side lines when printing a SfDataGrid but I have been unable to find a way to prevent them from showing up.

You can see an example of these lines on the syncfusion site: http://help.syncfusion.com/uwp/sfdatagrid/printing#page-settings

Basically, I don't want the left and right line border to be there, it feels like this should be real simple but I can't find a way to shut them off... can anyone enlighten me on how I shut them off?

Thank you,
Michael

Srinivasan Vasu [Syncfusion]
Replied On May 6, 2016 11:19 AM UTC

Hi Micheal, 
 
Thanks for contacting Syncfusion support. 
 
We have analyzed your query and you can achieve your requirement by editing the style of PrintPageControl in SfDataGrid as like in the below code example. 
To print SfDataGrid with custom style you have to set PrintSettings.AllowPrintStyles property as false. 
 
Please refer the below code example. 
 
XAML 
<Application.Resources> 
        <Style TargetType="syncfusion:PrintPageControl"> 
            <Setter Property="BorderThickness" Value="0"/> 
        </Style> 
    </Application.Resources> 
 
 
 
C# 
  private void Button_Click(object sender, RoutedEventArgs e) 
        {         
            Grid.PrintSettings = new PrintSettings(); 
            Grid.PrintSettings.AllowPrintStyles = false; 
            Grid.Print(); 
        }    
 
 
Please download sample from the below location. 
 
 
Regards, 
Srinivasan 
 


Michael Woolsey
Replied On May 6, 2016 01:16 PM UTC

Hello Srinivasan,

That worked nicely!

Thank you,
Michael

Srinivasan Vasu [Syncfusion]
Replied On May 9, 2016 08:54 AM UTC

Hi Micheal, 
  
Thanks for your update. 
  
Regards, 
Srinivasan 


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

;