int i=0;//匡拒埃癘魁
for (i=0;i<=this.grid_xueli.Items.Count - 1;i++)
{
if (((this.grid_xueli.Items[i].Cells[0].FindControl("TChBox_del") as CheckBox).Checked))
{
int _id= Int32.Parse(this.grid_xueli.Items[i].Cells[1].Text.Trim());//眔ID
string sql_Del = "DELETE FROM Edu where idno ="+_id;
con.open();
SqlCommand cmd = new SqlCommand(sql_Del,con.cnn);
cmd.ExecuteNonQuery();
cmd.Dispose();
con.close();
con.dgdatabind(this.grid_xueli,"select * from Edu");
//(grid1.Items[i].Cells[11].FindControl("TChBox_del") as CheckBox).Checked=true;
}
}
for (i=0;i<=this.grid_xueli.Items.Count - 1;i++)
{
if (((this.grid_xueli.Items[i].Cells[0].FindControl("TChBox_del") as CheckBox).Checked))
{
int _id= Int32.Parse(this.grid_xueli.Items[i].Cells[1].Text.Trim());//眔ID
string sql_Del = "DELETE FROM Edu where idno ="+_id;
con.open();
SqlCommand cmd = new SqlCommand(sql_Del,con.cnn);
cmd.ExecuteNonQuery();
cmd.Dispose();
con.close();
con.dgdatabind(this.grid_xueli,"select * from Edu");
//(grid1.Items[i].Cells[11].FindControl("TChBox_del") as CheckBox).Checked=true;
}
}