在richtextbox中创建表 [英] Create table in richtextbox
本文介绍了在richtextbox中创建表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人知道如何在RichTextBox中创建表吗?
列宽和高度会动态增加吗?
解决方案
请参阅此处 [ ^ ]。它可能有所帮助。
你应该更好地检查网格等其他选项。或解释为什么只需要RichTextBox。
试试这个:
richtextbox.Text = @< 表 ID = tbtest Runat < span class =code-keyword> = server style = width:100%; >
< tr >
< span class =code-keyword>< td id = tdh + i + runat = 服务器 > + myReader [i] .ToString()+ @ < / td >
< td id = tdh2 runat = 服务器 > Pkg输入< / td >
< td id = tdh3 runat = 服务器 > 说明< / td >
< td id = tdh4 runat = 服务器 > 维度< / td >
< td id = tdh5 runat = < span class =code-keyword> server > 重量< / td >
< < span class =code-leadattribute> / tr >
< tr >
< td id = td1 runat = 服务器 > test < / td >
< td < span class =code-attribute> id = td2 runat = 服务器 > ; test < / td >
< td id = td3 runat = 服务器 > test < / td >
< td id = td4 runat = 服务器 > test < / td >
< td id = td5 runat = 服务器 > test < span class =code-keyword>< / td >
< / tr >
< tr >
< td id = td6 runat = 服务器 > test < / td >
< td id = td7 runat = 服务器 > test < / td >
< td id = td8 runat = 服务器 > test < / td >
< td id = td9 runat = 服务器 > test < span class =code-keyword>< / td >
< td id = tdh10 runat = 服务器 > test < / td >
< / tr >
< / table > 跨度>;
Does anybody know how to create a table in a RichTextBox?
Column width and height will be dynamically increase?
解决方案
See here[^]. It may help.
You should better check other options like grid instead. or explain why only RichTextBox is required.
try this:
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>";
这篇关于在richtextbox中创建表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文