FineUI 官方论坛
标题:
编辑表格时,怎样获取隐藏字段的值(GetNewAddedList)
[打印本页]
作者:
yygy
时间:
2014-12-23 23:41
标题:
编辑表格时,怎样获取隐藏字段的值(GetNewAddedList)
<P>表中有两个字段,其中一个隐藏(id),保存时怎样获取id的值?GetNewAddedList里没有隐藏(id)的记录</P>
<P><f:Grid ID="Grid2" Title="表格" ShowBorder="true" ShowHeader="false" EnableHeaderMenu="false" OnRowCommand="Grid1_RowCommand"
AllowCellEditing="true" EnableCheckBoxSelect="true" runat="server" ClicksToEdit="2">
<Columns>
<f:RenderField DataField="id" ColumnID="A1" FieldType="String" HeaderText="id" Hidden="true">
<Editor>
<f:TextBox ID="TextBox6" Required="true" runat="server">
</f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField DataField="名称" ColumnID="A2" FieldType="String" HeaderText="名称">
<Editor>
<f:TextBox ID="TextBox7" Required="true" runat="server" Readonly="true">
</f:TextBox>
</Editor>
</f:RenderField>
</Columns>
</f:Grid>
// 新增数据
List<Dictionary<string, object>> newAddedList = Grid2.GetNewAddedList();
for (int i = 0; i < newAddedList.Count; i++)
{
sql += string.Format("Insert into 打卡时间(d,名称) VALUES ({0},'{1}') ", newAddedList[i]["A1"].ToString(), newAddedList[i]["A2"].ToString());
}</P>
复制代码
欢迎光临 FineUI 官方论坛 (https://fineui.com/bbs/)
Powered by Discuz! X3.4