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. Image for the cookie policy date

Want to add html as PdfLightTable row column value


I Want to add html as PdfLightTable row column value.for example

            DataTable myDataTable = new DataTable();
            DataRow myDataRow;
            DataColumn D1 = new DataColumn();
            D1.DataType = System.Type.GetType("System.String");
            D1.ColumnName = "Label" + Id;

            // Create a second column.
            DataColumn D2 = new DataColumn();
            D2.DataType = Type.GetType("System.String");
            D2.ColumnName = "Answer" + Id;
            string label="Myname"
            string Value="My Vlaue";

           myDataRow = myDataTable.NewRow();
            //myDataRow["Label" + Id] = System.Net.WebUtility.HtmlEncode(Name);
            myDataRow["Label" +  Id] = Name;
            myDataRow["Answer" +  Id] = Value;

            PdfLightTable table = new Syncfusion.Pdf.Tables.PdfLightTable();
            table.DataSource = myDataTable;

In the above code I need to add html tags inside table column value and it has to print in the pdf without html tasg and with rendered form

Eg:    myDataRow["Answer" +  Id] = "<p>This is a text <br/><b> This is Good</b></p>";

Please help if it is possible


1 Reply

KC Karthikeyan Chandrasekar Syncfusion Team July 28, 2014 06:34 AM UTC

Hi Sreenath,

Thank you for your interest in Syncfusion Products.


At present we do have only support for accepting Sting as the data values, we have logged a feature request for accepting HTML tags as input. We will implement this feature in any of our upcoming releases. We usually have an interval of at least three months between releases. The feature implementation would also greatly depend on the factors such as product design, code compatibility and complexity. We will update you when this feature has been implemented.




Live Chat Icon For mobile
Up arrow icon