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

How to set Text alignment for a specific PDFGrid''s cell?

Thread ID:

Created:

Updated:

Platform:

Replies:

97290 Nov 15,2010 01:25 PM UTC Nov 16,2010 05:30 AM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: PDF
kim
Asked On November 15, 2010 01:25 PM UTC

Hi!

I try to center the Text with the code below; however it does not work.

PdfGrid grid = new PdfGrid();
grid.Columns.Add(3);

PdfGridRow row;



row.Cells[1].Style.Font = new PdfStandardFont(PdfFontFamily.Courier, 20, PdfFontStyle.Bold);

row.Cells[1].Style.StringFormat = new PdfStringFormat(PdfTextAlignment.Center);

row.Cells[1].Value = ("CENTER TEXT");


How do I center a text in a specific cell?

Thanks!


Priyadharshini J [Syncfusion]
Replied On November 16, 2010 05:30 AM UTC

Hi Kim,

Thank you for your interest in Syncfusion proudcts.

We have placed a sample in the link below to align the text to the center of a specific cell.
forum-785344585.zip

Kindly try this and let us know if you have any queries.

Regards,
Priyadharshini



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

;