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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Is there a way to have text with different styles in the same table cell?

Platform: WinForms |
Control: PDF |
Published Date: February 4, 2015 |
Last Revised Date: February 4, 2015
Tags: pdf, layer

Yes, you can apply different styles to the text in the same table cell. This can be achieved by drawing the texts at the specified positions with different styles using Graphics.

Refer to the following code example to apply styles in cell.


//Add the row and value to the cell

for (int i = 0; i < 10; i++)


PdfGridRow pdfGridRow = pdfGrid.Rows.Add();

pdfGridRow.Cells[0].Value = "Syncfusion";

pdfGridRow.Cells[1].Value = "Software";


//Apply the font

pdfGrid.Style.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 14, PdfFontStyle.Regular);

//Draw the string in cell

page.Graphics.DrawString("Software", new PdfStandardFont(PdfFontFamily.TimesRoman, 14F, PdfFontStyle.Bold), PdfBrushes.Black, new PointF(100, 0));

//Draw the Grid

pdfGrid.Draw(page, new PointF(0,0));

Sample link:


You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

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