(
//單擊
public void STmyGrid_edit(object source
{
//獲取DataGrid所要編輯的項的索引
STmyGrid
BindGrid();
}
(
獲取編輯狀態下的文本框中的值
//單擊
public void STmyGrid_update(object source
{
//創建更新連鎖店信息的sql語句
string STstrsql=
//創建數據庫的SqlCommand對象
SqlCommand STcmd=new SqlCommand(STstrsql
try
{
//向SqlCommand對象添加參數
STcmd
STcmd
STcmd
STcmd
string stupdatetext=((TextBox)e
//向參數賦值
STcmd
stupdatetext=((TextBox)e
STcmd
stupdatetext=((TextBox)e
STcmd
right
From:http://tw.wingwit.com/Article/program/net/201311/15611.html