本文介绍了填充标准的dyanamically的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI专家





我有一个包含3行和3列的数据表。我想要将它绑定到webform中。 Lable可以动态填充。请指导我。



以下是我以前的代码。但它对我不起作用。



TableRow tr = new TableRow();

tr.ID =tr+ count;

tc.ID =tc+ tablecellid;

lbl.ID =ID+ tablecellid;

lbl.Text = dtfinal。行[i] [TEXT]。ToString();

tablecellid = tablecellid + 1;

tc.ID =tc+ tablecellid;

lbl.ID =ID+ tablecellid;

lbl.Text = dtfinal.Rows [i] [DESC]。ToString();

count = count + 1;

tablecellid = tablecellid + 1;

tc.Controls.Add(lbl);

tr.Cells.Add (tc);

Table1.Rows.Add(tr);





Rgds

Jagadesh

解决方案



HI EXPERTS


I had a datatable which contains 3rows and 3 columns. I want this to be bind in a lable into the webform. Lable to be populate Dynamically. Kindly guide me.

Below is the code i used to do. But it is not working for me.

TableRow tr = new TableRow();
tr.ID = "tr" + count;
tc.ID = "tc" + tablecellid;
lbl.ID = "ID" + tablecellid;
lbl.Text = dtfinal.Rows[i]["TEXT"].ToString();
tablecellid = tablecellid + 1;
tc.ID = "tc" + tablecellid;
lbl.ID = "ID" + tablecellid;
lbl.Text = dtfinal.Rows[i]["DESC"].ToString();
count = count + 1;
tablecellid = tablecellid + 1;
tc.Controls.Add(lbl);
tr.Cells.Add(tc);
Table1.Rows.Add(tr);


Rgds
Jagadesh

解决方案



这篇关于填充标准的dyanamically的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 01:36