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

HTMLTextBox inside table column not showing text properly

9 Answers 481 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Gopinath
Top achievements
Rank 2
Gopinath asked on 22 May 2013, 12:56 PM
Hi,

I have HTML Textbox inside table column . But the text not showing properly. 

I made cangrow=true and canshrink=false. But event then no luck.

Find attachment and please help me

9 Answers, 1 is accepted

Sort by
0
Gimmik
Top achievements
Rank 1
answered on 23 May 2013, 04:29 PM
Hi Gopinath,

What markup are you inserting into the HTMLTextBox? It doesn't support the full HTML specification, so some markup won't render correctly. I made this mistake myself and it took me a while to figure out.
0
Gopinath
Top achievements
Rank 2
answered on 23 May 2013, 05:40 PM
Hi Gimmik,

Thanks for your reply.

I am binding collection to the table.

In that collection, to one of the item i have assigned value as shown below

string.Format( "<div>{1}<b>{0}</b></div>","TESTING","TESTING AGAIN")

Even i tried replacing div with p tag. But facing same issue. 

Please let me know your suggestions.
0
Gimmik
Top achievements
Rank 1
answered on 24 May 2013, 07:18 PM
Hi Gopinath,

That should work - although you should probably use the IsValidXhtml method just to be sefe - like this:

HtmlTextBox.Value = string.Format("=Iif(IsValidXhtml('{0}'), '{0}', '{1}')", validXhtml, systemXhtml);

Are you sure the TextBox isn't just too small for the text? Try giving it a little more height.
0
Gopinath
Top achievements
Rank 2
answered on 27 May 2013, 06:50 AM
Hi Gimmik,

Thanks for your reply. 

I tried giving height and mentioned IsValidXhtml method.but it didn't help me. 

Actually i already set CanGrow=True and CanShrink=False for the table column and HTML TextBox.  

I am binding data to the column dynamically. So i believe setting height may not help me .

But when i tried to set more height for the HTML Text box,  just height of the text box increased. But content in the text box remained as like before.(You can see that in my previous attached file) 

Any other suggestion please.

0
Gopinath
Top achievements
Rank 2
answered on 27 May 2013, 07:36 AM
Hi Gimmik,

I have observed one thing. Where ever i place the HTML text box in the report, i mean either in the header or in the detail section or in the footer i can see the data not displayed properly.

I installed Telerik_Reporting_Q1_2013_Dev for reports purpose.

Is this version having any problem in the HTML text box? 

Thanks
Gopinath
0
Stef
Telerik team
answered on 27 May 2013, 08:32 AM
Hello everyone,

@Gimmik: Thank you for helping other community members. We truly appreciate your involvement.

@Gopinath: HTML rendering has been changed in latest versions of Telerik Reporting. Can you please specify which version is used in your application? Also let us know if after upgrading to the latest available internal build 7.0.13.521 the issue still exists or if adding <br/> tags to the end of the HtmlTextBox item's content solves the issue.

Regards,
Stef
Telerik

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

0
Gopinath
Top achievements
Rank 2
answered on 27 May 2013, 09:16 AM
Hi Stef,

Thanks for your reply. 

1) Currently i am using  Q1 2013 build 7.0.13.220.

2) I tried setting <br/>, it's not working.  I tried placing <br/> at end of div tag , even then it's not working.

3) Even i tried latest available internal build 7.0.13.521 .But still the problem exists. Please find the attached screen shot

Below is the code sample ,  i am binding to the table  

( Note : McVolTrckIndMatComponents  stands for one of the class name in my application)

  var reportRowData = new List<string>();
        var mcVolTrckIndMatComponents = values.Current as McVolTrckIndMatComponents;
        reportRowData.Add(
                 string.Format(
                        "<div>{1}<b>{0}<br/></b></div>",
                        mcVolTrckIndMatComponents.MATERIAL_SHORT_NAME,
                        this.GetIntendOnDeblendLevel((int)mcVolTrckIndMatComponents.DEBLEND_LEVEL)));
         reportRowData.Add(mcVolTrckIndMatComponents.MAX_BASE_W.ToString());
         reportRowData.Add(mcVolTrckIndMatComponents.MAX_BASE_V.ToString());
         reportRowData.Add(mcVolTrckIndMatComponents.PURPOSE_DESC);
         reportRowData.Add(mcVolTrckIndMatComponents.COMP_CAS_NO);
         reportCollection.Add(reportRowData);

         this.table1.DataSource = reportCollection;
      ----------------------------------------------------------------------------------
      private string GetIntendOnDeblendLevel(int deblendLevel)
        {
            const string CompIndent = "&nbsp;&nbsp;&nbsp;";
            int recordCount;
            var indent = new StringBuilder();

            for (recordCount = 0; recordCount < deblendLevel; recordCount++)
            {
                indent.Append(CompIndent);
            }
            return indent.ToString();
        }

Please correct me if i am wrong.

Thanks
Gopinath
0
Stef
Telerik team
answered on 30 May 2013, 12:41 PM
Hi Gopinath,

You can find attached an XML report definition created with Telerik Reporting Q1 2013 v7.0.13.521 and a screenshot from displaying the report in IE9. The issue is not reproducible with the mentioned version and the specified string passed as HtmlTextBox item value, so please double check if you have upgraded all references in your project correctly.

If you need further help, please send us the report definition and steps how to reproduce the issue.

Regards,
Stef
Telerik

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

0
dushyanth
Top achievements
Rank 1
answered on 23 Sep 2016, 10:44 AM
<%# Server.HtmlDecode(DataBinder.Eval(Container.DataItem, "Approvers").ToString()) %>
Tags
General Discussions
Asked by
Gopinath
Top achievements
Rank 2
Answers by
Gimmik
Top achievements
Rank 1
Gopinath
Top achievements
Rank 2
Stef
Telerik team
dushyanth
Top achievements
Rank 1
Share this question
or