2014年6月5日

在Gridview编辑时添加DropDownList控件并设置默认值

摘要: 页面代码: <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="650px" Font-Size="12px" ForeColor ="#43860c" DataKeyNames="user_i 阅读全文

posted @ 2014-06-05 11:10 lxboy 阅读(856) 评论(0) 推荐(0)

取得GridView某行的DataKey

摘要: 首先绑定DataKeyNames GridView.DataKeyNames = new string[] { "字段名称" }; 取值 string aaa= GridView.DataKeys[e.Row.RowIndex].Value.ToString();1、在绑定时设置主键: //设置主键 阅读全文

posted @ 2014-06-05 09:35 lxboy 阅读(362) 评论(0) 推荐(0)

导航