Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
1.70/5 (3 votes)
See more:
Does anybody know how to create a table in a RichTextBox?

Column width and height will be dynamically increase?
Posted
Updated 6-Feb-18 3:12am
v2

See here[^]. It may help.
 
Share this answer
 
Comments
Member 11557708 9-Apr-15 7:42am    
@Abhinav:link seems dead.
You should better check other options like grid instead. or explain why only RichTextBox is required.
 
Share this answer
 
Comments
fjdiewornncalwe 9-Dec-10 8:20am    
In the future, please post this as a comment to the question. It is not an answer and therefore shouldn't be posted as one. Cheers.
Prerak Patel 9-Dec-10 8:32am    
I'll take care of that.
try this:
XML
richtextbox.Text = @"<table ID=tbtest Runat=server style=width:100%;>
            <tr>
                <td id=tdh" + i + "runat=server>" + myReader[i].ToString() + @"</td>
                <td id=tdh2 runat=server>Pkg Type</td>
                <td id=tdh3 runat=server>Description</td>
                <td id=tdh4 runat=server>Demension</td>
                <td id=tdh5 runat=server>Weight</td>
            </tr>
            <tr>
                <td id=td1 runat=server>test</td>
                <td id=td2 runat=server>test</td>
                <td id=td3 runat=server>test</td>
                <td id=td4 runat=server>test</td>
                <td id=td5 runat=server>test</td>
            </tr>
            <tr>
                <td id=td6 runat=server>test</td>
                <td id=td7 runat=server>test</td>
                <td id=td8 runat=server>test</td>
                <td id=td9 runat=server>test</td>
                <td id=tdh10 runat=server>test</td>
            </tr>
        </table>";
 
Share this answer
 
Comments
Member 11857387 23-Jul-15 7:25am    
Text propery not exist for RichText box

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900