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. Image for the cookie policy date

Print column width, not all columns fit on page

Hello

My grid’s width is set to 100% and it has 3 columns. When printing the preview only shows 2 columns (more specific the pdf preview below the print dialog has 3 columns but in the print dialog there are only 2 columns). When changing the orientation of the page to landscape, all 3 pages are visible in the preview. 

How can I change the grid’s columns that all 3 of them fit on the page when using portrait orientation?

Please note, all of the changes mentioned above must only apply when printing, not any at other time.
 
Thank you for your help.


Kind Regards

Phil

3 Replies

SA Saravanan Arunachalam Syncfusion Team September 15, 2017 08:40 AM UTC

Hi Phil, 
Thanks for contacting Syncfusion’s support. 
We are able to reproduce your reported issue when we set the scrollSettings.width as 100% and define the columns without specify the width that we can resolve by using CommonWidth property of Grid control. Please refer to the below code example and api reference link. 
@(Html.EJ().Grid<object>("FlatGrid") 
            . . . 
            .CommonWidth(100) 
        ) 
Regards, 
Saravanan A. 



PH Phil September 17, 2017 02:29 PM UTC

Hello

That is exactly what I was looking for. Thank you very much.


Phil



SA Saravanan Arunachalam Syncfusion Team September 18, 2017 05:39 AM UTC

Hi Phil,  
Thanks for your update.            
We are happy that the provided information helped you. 
Regards, 
Saravanan A. 


Loader.
Live Chat Icon For mobile
Up arrow icon