This is a migrated thread and some comments may be shown as answers.

RadGridView Print

4 Answers 221 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mh
Top achievements
Rank 1
Mh asked on 13 Apr 2014, 01:02 PM
Hi Guys, 
I have to find out if the printed gridview is out of margin (inside the RadPrintDocument or not) to switch the orientation to landscape,
then reduce font size if gridview stills out.
thanks in advance.

4 Answers, 1 is accepted

Sort by
0
Mh
Top achievements
Rank 1
answered on 13 Apr 2014, 09:39 PM
Nobody can help??!
0
Accepted
Ralitsa
Telerik team
answered on 14 Apr 2014, 10:57 AM
Hi Mh Almasri, 

Thank you for contacting us.

You can calculate the grid width and set the font and the document orientation to depend on it. When the sum of grid`s columns width is bigger than print document`s width, you can set the CellFont property of the GridPrintStyle to the desired font size and the Landscape property of RadPrintDocument to true. Please take a look at the attached sample demo which demonstrates you the approach. 

I hope this will help you. Let me know if you have any other questions.

Regards,
Ralitsa
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Mh
Top achievements
Rank 1
answered on 14 Apr 2014, 11:28 AM
Thank you very much,
I have another question,
How can I increase the height of the rows only which have clipped string (StringFormatFlags.NoClip)

 private void DGV_Main_PrintCellFormatting(object sender, PrintCellFormattingEventArgs e)
        {
            e.PrintCell.StringFormatFlags = StringFormatFlags.NoClip;   
       }








0
Ralitsa
Telerik team
answered on 16 Apr 2014, 07:53 AM
Hi Mh Almasri, 

This question has already been answered in the other thread you've opened. Please, see our answer there for more information.

We kindly ask you to use just one support channel to contact us. Posting the same questions numerous times slows down our response time because we will need to review and address two or more tickets instead of one. Moreover threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread.
 
Regards,
Ralitsa
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
GridView
Asked by
Mh
Top achievements
Rank 1
Answers by
Mh
Top achievements
Rank 1
Ralitsa
Telerik team
Share this question
or