最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
东方兄,我搞定了,看代码
时间:2022-07-02 12:11:53 编辑:袖梨 来源:一聚教程网
public void DataGrid1_Edit(object sender,DataGridCommandEventArgs e)
{
string strSql;
string ConnectionString;
ConnectionString = ConfigurationSettings.AppSettings["ConnectionString"];
DataGrid1.EditItemIndex =(int)e.Item.ItemIndex;
BindGrid();
DropDownList ddl = (DropDownList)(DataGrid1.Items[e.Item .ItemIndex].Cells [4].Controls [1]);
strSql = "select WorkState,ItemNumber from ASP_Temp";
OleDbConnection myconn=new OleDbConnection(ConnectionString );
OleDbCommand mycommand=new OleDbCommand (strSql,myconn);
myconn.Open();
OleDbDataReader myreader=mycommand.ExecuteReader();
ddl.DataSource =myreader;
ddl.DataTextField ="WorkState";
{
string strSql;
string ConnectionString;
ConnectionString = ConfigurationSettings.AppSettings["ConnectionString"];
DataGrid1.EditItemIndex =(int)e.Item.ItemIndex;
BindGrid();
DropDownList ddl = (DropDownList)(DataGrid1.Items[e.Item .ItemIndex].Cells [4].Controls [1]);
strSql = "select WorkState,ItemNumber from ASP_Temp";
OleDbConnection myconn=new OleDbConnection(ConnectionString );
OleDbCommand mycommand=new OleDbCommand (strSql,myconn);
myconn.Open();
OleDbDataReader myreader=mycommand.ExecuteReader();
ddl.DataSource =myreader;
ddl.DataTextField ="WorkState";
相关文章
- 《原神》5.2卡池抽取建议 11-14
- 《原神》5.2版本新怪物介绍 11-14
- 《原神》希诺宁增伤触发方法 11-14
- 《原神》循音觅奇活动入口 11-14
- 《原神》循音觅奇兑换码获取方法 11-14
- 《原神》花羽会活动飞行技巧介绍 11-14