HTMLTextBox inside table column not showing text properly

10 posts, 0 answers
  1. Gopinath
    Gopinath avatar
    63 posts
    Member since:
    Sep 2011

    Posted 22 May 2013 Link to this post

    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
  2. Gimmik
    Gimmik avatar
    170 posts
    Member since:
    May 2011

    Posted 23 May 2013 Link to this post

    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.
  3. DevCraft banner
  4. Gopinath
    Gopinath avatar
    63 posts
    Member since:
    Sep 2011

    Posted 23 May 2013 Link to this post

    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.
  5. Gimmik
    Gimmik avatar
    170 posts
    Member since:
    May 2011

    Posted 24 May 2013 Link to this post

    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.
  6. Gopinath
    Gopinath avatar
    63 posts
    Member since:
    Sep 2011

    Posted 27 May 2013 Link to this post

    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.

  7. Gopinath
    Gopinath avatar
    63 posts
    Member since:
    Sep 2011

    Posted 27 May 2013 Link to this post

    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
  8. Stef
    Admin
    Stef avatar
    3053 posts

    Posted 27 May 2013 Link to this post

    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.

  9. Gopinath
    Gopinath avatar
    63 posts
    Member since:
    Sep 2011

    Posted 27 May 2013 Link to this post

    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
  10. Stef
    Admin
    Stef avatar
    3053 posts

    Posted 30 May 2013 Link to this post

    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.

  11. dushyanth
    dushyanth avatar
    1 posts
    Member since:
    Sep 2016

    Posted 23 Sep in reply to Gopinath Link to this post

    <%# Server.HtmlDecode(DataBinder.Eval(Container.DataItem, "Approvers").ToString()) %>
Back to Top
DevCraft banner