如何在运行时合并表的选定单元格? [英] How to merge selected cells of table in run time?

查看:98
本文介绍了如何在运行时合并表的选定单元格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个带有表格的div,其中包含100行和50列。它可以是静态的。并且html或asp组件并不重要。

现在我希望能够合并运行时选择的单元格。

我该怎么办?

谢谢你提前。

I need a div with a table in it that contains 100 row and 50 columns in it.It can be static. and it is not important to be html or asp component.
Now i want to be able to merge cells that in run time are selected by me.
How can i do that?
Thanks in advanced.

推荐答案

你好,



你可能要做的通过指定Id和runat =server属性来表示服务器元素。之后根据您的逻辑,您可以使用以下内容添加colspan或rowspan来合并单元格/行。

Hi,

You may have to make the table a server element by specifying the ''Id'' and the runat="server" attributes. After that based on your logic you can make use of the following to add either a colspan or a rowspan to merge the cells / rows.
TableObject.Attributes.Add("colspan", yourValue);
TableObject.Attributes.Add("rowspan", yourValue);



希望这有助于......


Hope this helps...


这篇关于如何在运行时合并表的选定单元格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆