string STstrsql=
//創建SqlCommand對象
SqlCommand STcmd=new SqlCommand(STstrsql
try
{
//添加參數
STcmd
STcmd
STcmd
STcmd
string stupdatetext=((TextBox)e
STcmd
stupdatetext=((TextBox)e
STcmd
stupdatetext=((TextBox)e
STcmd
STcmd
//打開連接
STcmd
//執行非查詢
STcmd
STmyGrid
}
catch(SqlException ex)
{
throw ex;
}
//關閉連接
STcmd
BindGrid();
}
(
//單擊
public void STmyGrid_cancel(object source
{
//獲取DataGrid所要編輯的項的索引為
STmyGrid
BindGrid();
}
right
From:http://tw.wingwit.com/Article/program/net/201311/15192.html