Is there a way to adjust the grid row height based on length of text that is assigned to a grid cell?
Hi Jp,
Thanks for using syncfusion product,
We have created the sample to calculate the string height and also adjusted the pdfGrid height with the string height, Please try the sample in your environment and let us know if you found any issue.
PdfGridIssues.zip
Thanks,
Chinnu
Hi Jp,
Thanks for using syncfusion product,We have created the sample to calculate the string height and also adjusted the pdfGrid height with the string height, Please try the sample in your environment and let us know if you found any issue.
PdfGridIssues.zip
Thanks,
Chinnu
Hi Jp,
We have changed the sample as per your requirement, and also paste the code snippet for your reference. Please try this sample and let us know if you have any concern.
//Get total width of the page
float pagewidth = page.GetClientSize().Width;
//divide the grid column count to page width now get a single column width
float columnWidth = pagewidth /= numberOfColumn;
//divide the text width and column width
float lineCount = (size.Width / columnWidth)+1;
//set the row height
grid.Rows[0].Height = ((size.Height+1) * lineCount;
Sample link:
http://www.syncfusion.com/downloads/support/directtrac/general/PdfGridIssues1676239076.zip