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

GridView/ExportMethods

11 Answers 167 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ramius
Top achievements
Rank 1
Ramius asked on 24 Jun 2010, 07:24 PM
Hello,

i looked at the GridView/Export/ExportMethods Demo.
I used Export to PDF to create a pdf-file.

The created pdf-file looks mostly correct, but there are 2 errors.

Companyname:
1. GROSELLA-Restaurant not correctly exported. The name is written over the next column instead it should be wrapped to the second line.
2. LILA-Supermercado. Same error as no. 1

Kind Regards,

Ramius

11 Answers, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 30 Jun 2010, 12:09 PM
Hello Ramius,

Thank you for writing.

ExportToPDF is rendering an XHTML table, which is converted to the PDF format afterward. Unfortunately we do not support "word-break" to allow cut and shift a word in a single cell. Currently the only way to overcome this limitation is to change the column width. We will do that in our example for the official release.

Do not hesitate to contact me again if you have any other questions.

Sincerely yours,
Martin Vasilev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ramius
Top achievements
Rank 1
answered on 30 Jun 2010, 03:24 PM
Hello Martin,

thank you for your answer.

To change the column width is ok as a workaround but it's not a good solution. The problem depends on the data in the grid and it may occur in more than one column.

I hope you will find a better solution for the problem.

Kind Regards,

Ramius
0
Martin Vasilev
Telerik team
answered on 05 Jul 2010, 05:19 PM
Hello Ramius,

Thank you for getting back to me.

Indeed supporting word-break will be a better solution and we will investigate this further to add it in some of the next releases. However, since our conversion library does not support it out-of-the-box I cannot guarantee we will include that feature in the upcoming Q2 2010 release.  Once again thank you for your feedback. Your Telerik points have been updated.

Best wishes,
Martin Vasilev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
erwin
Top achievements
Rank 1
Veteran
Iron
answered on 06 Jul 2010, 08:20 PM
Hello

How about an option to scale the font so that all cells display the same on a page as in the grid.
Content that is to large (epecially headers) should print an ellipsis.
Under no circumstance should content of one cell print over another, that does just not look professional.

I played around with the PDF Export a little bit, and so far I would not include that into my application.
Maybe a better solution would be to include Print support in the Grid similar to Excel (definition of print ranges etc.) And let the user
print to PDF if she desires.

Regards
Erwin
0
Martin Vasilev
Telerik team
answered on 10 Jul 2010, 08:54 AM
Hello erwin,

Thank you for the feedback.

In the official release we will include a lot more options for ExportToPDF. Still, overlapping cannot be completely avoided if the column width is smaller than the word length, because as I have already said, our PDF library does not support word-break. However, there will be scale settings, which will allow you to set up the pdf in a way that there will be no overlap in the specific situations.

Kind regards,
Martin Vasilev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Imran
Top achievements
Rank 1
answered on 26 Jul 2010, 05:43 AM
The Q2/2010 Winforms documentation is incomplete.
I can not find out the ExportToPDF object anywhere in the documentation.
Where is the documentation of this library ?????

0
Nikolay
Telerik team
answered on 02 Aug 2010, 09:18 AM
Hi Imran,

Thank you for writing.

We had a small technical issue which prevented us from including the Export To PDF article in our desktop documentation. However, you can find it uploaded in our online documentation:
http://www.telerik.com/help/winforms/grid-export_to_pdf.html

Greetings,
Nikolay
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Daniel
Top achievements
Rank 1
answered on 04 Nov 2010, 06:19 PM
I have a grid view that contains rows with different font families... is there any way to get the PDF to crate using the individual row/cell fonts?

Thanks!
0
Martin Vasilev
Telerik team
answered on 10 Nov 2010, 03:45 PM
Hi Daniel,

Thank you for writing.

You can try handling the HTMLCellFormatting event of the ExportToPDF feature to specify the settings for a particular cell:
void pdfExporter_HTMLCellFormatting(object sender, HTMLCellFormattingEventArgs e) 
 
     if (e.GridColumnIndex == 3) 
     
         e.HTMLCellElement.Styles.Remove("font-family"); 
         e.HTMLCellElement.Styles.Add("font-family", "Arial");    
     
      
 }

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

Greetings,
Martin Vasilev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
KUMARAN
Top achievements
Rank 1
answered on 18 Apr 2015, 11:46 AM

I tried this for change font size..but no working as i thought.

 

e.HTMLCellElement.Styles.Add("font-size", "22")

0
Todor
Telerik team
answered on 20 Apr 2015, 08:04 AM
Hello,

Thank you for writing.

To format the font size you need to assign a proper value. "22" is not valid value when assigned to the font-size HTML attribute and that is why it is not applied. Possible values are "22pt", "22px", "22%" etc.
e.HTMLCellElement.Styles.Add("font-size", "22pt");

I hope this information helps.
 
Regards,
Todor Vyagov
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
GridView
Asked by
Ramius
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Ramius
Top achievements
Rank 1
erwin
Top achievements
Rank 1
Veteran
Iron
Imran
Top achievements
Rank 1
Nikolay
Telerik team
Daniel
Top achievements
Rank 1
KUMARAN
Top achievements
Rank 1
Todor
Telerik team
Share this question
or