Issue with Border, Cellspacing and cellpadding tags for html table

1 posts, 0 answers
  1. Manish
    Manish avatar
    2 posts
    Member since:
    Feb 2013

    Posted 27 Feb 2013 Link to this post

    In my application i have to display a html report containing a table in it . Here i have to bind the RadrichtextBox with a string which contains all html code. All html style tags are working fine except Border, Cellspacing and cellpadding tags.

    Xaml Code:
          <telerik:HtmlDataProvider x:Name="HtmlProvider"
                              RichTextBox="{Binding ElementName=SampleRadRichTextBox}"
                              Html="{Binding Content, Mode=OneWay}" >
                    <telerik:HtmlExportSettings DocumentExportLevel="Fragment"                                                         StylesExportMode="Inline"                                                                                                                                                                     
    <telerik:RadRichTextBox  x:Name="SampleRadRichTextBox" IsReadOnly="True" IsSpellCheckingEnabled="False"  >

    ViewModel code:
    private string content;
      public string Content
                    return this.content;
                    this.content = value;

    Html code which i m passing to "Content" property in view model
    <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' ''><html xmlns=''lang='en' xml:lang='en'>
    <title> Sample</title>
     <style type='text/css'>
    th{font-weight: bold;font-size: 8pt; color: black; font-family: arial, sans-serif; text-align: center}
    td{ font-weight: normal; font-size: 8pt; color: black; font-family: 'ms sans serif', arial, sans-serif; text-decoration: none}
    td.text{ text-align: left}
     td.cas_num{ text-align: left}
    td.numeric{ text-align: right}
     td.indicator{ text-align: center}
    h2{font-weight: bold; font-size: 12pt; color: black; font-family: arial, sans-serif; text-align: center}
    h4{ font-weight: normal ; font-size: 10pt; color: black; font-family: arial, sans-serif; text-align: left}-->>
    <h2>Sample Report</h2>
    <h4>For RadRichTextBox</h4><br/>
    <table border="2" cellpadding="2" cellspacing="2" width="100%">
    <tr><th align='center'>First</th>
    <th align='center'>Second</th>
    <th align='center'>Third</th>
    <th align='center'> Fourth</th>
    <tr><td class='TEXT'><b>Data1</b></td>
    <td class='NUMERIC'>100.0000000000</td>
    <td class='NUMERIC'>100.0000000000</td>
    <td class='TEXT'>Data2</td>
    <tr><td class='TEXT'>Data3</td>
    <td class='NUMERIC'>100.0000000000</td>
    <td class='NUMERIC'>100.0000000000</td>
    <td class='TEXT'>Data4</td>

     I am attaching scree shots of radrichrextBox's output and what i want(as html output). Please 
    have a look and provide solution ASAP.
Back to Top