在Asp.net的表控件中显示数据

问题描述:

大家好,


我必须在数据库按钮的单击事件中在Table控件中显示数据.请帮助我.


谢谢您

Hi all,


I have to show data in Table control on click event of a button with database .Please help me.


Thanking You

您必须在运行时构造表,然后将其放在预定义的面板/占位符中.
创建一个表,然后定义它的列,然后一个一行地添加行.

尝试!
You have to construct the table at runtime and then place it in pre-defined panel/placeholder.
Create a table and then define columns of it and then add rows one-by-one.

Try!


用户表,TableRow和TableCell类来构造表.生成TableCell时,请在其中绑定数据库值.

让我知道您是否需要任何进一步的帮助!
User Table, TableRow and TableCell Class to construct the table. When Generating TableCell, bind the database value with in that.

Let me know if you need any further help !


首先让我清除一件事.服务器端表和客户端表完全不同.

当您处理HtmlTable,TableRow或TableCell时,它们实际上已映射/渲染到客户端Table,tr和td中.

因此,如果您是在客户端执行此操作,那么我认为您需要处理客户端html标签,单击该标签后即可转到服务器.

检查
http://www.w3schools.com/aspnet/control_table.asp [
First let me clear one thing. Server side Table and client Tables are completely different.

When you are dealing with HtmlTable, TableRow or TableCell, those are actually mapped / rendered into client Table, tr and td.

So if you are doing this for client side I think you need to deal with client side html tags, and when the tag is clicked you can go to server.

Check
http://www.w3schools.com/aspnet/control_table.asp[^]
:thumbsup: