FineUI 官方论坛
标题:
求助!!!如何动态生成可以编辑的表格???
[打印本页]
作者:
peter_923
时间:
2014-11-13 09:33
标题:
求助!!!如何动态生成可以编辑的表格???
[img]file:///C:\Users\Administrator\AppData\Roaming\Tencent\Users\176566158\QQ\WinTemp\RichOle\@R3GN4B7M[9@5)W03FQ4C}L.jpg[/img][attach]6797[/attach]
[attach]6798[/attach]
private void InitGrid()
{
string nid = Request.QueryString["gotoNID"];
string rid = Request.QueryString["gotoRID"];
DataTable NidTable = ZXClass.GetDataTable("SELECT NID,NAME FROM ATTRIBUTE_NODE WHERE FATHER_ID='" + nid + "' ORDER BY NID ASC");
ArrayList NidList = new ArrayList();
ArrayList NameList = new ArrayList();
foreach (DataRow dr in NidTable.Rows)
{
NidList.Add(dr["NID"]);
NameList.Add(dr["NAME"]);
}
FineUI.RenderField bf;
bf = new FineUI.RenderField();
bf.DataField = "NID";
bf.HeaderText = "节点ID";
//bf.Hidden = true;
Grid1.Columns.Add(bf);
bf = new FineUI.RenderField();
bf.DataField = "NAME";
bf.HeaderText = "右侧/下侧";
Grid1.Columns.Add(bf);
for (int i = 0; i < NidList.Count; i++)
{
bf = new FineUI.RenderField();
bf.DataField = Convert.ToString(NidList
);
bf.HeaderText = Convert.ToString(NameList
);
Grid1.Columns.Add(bf);
}
Grid1.DataKeyNames = new string[] { "NidID" };
}
怎么给每一列增加TextBox
<Editor>
<f:TextBox ID="tbxEditorName" Required="true" runat="server">
</f:TextBox>
</Editor>
欢迎光临 FineUI 官方论坛 (https://fineui.com/bbs/)
Powered by Discuz! X3.4