Response
}
}
public void BindGrid()
{
//創建查詢用戶信息的sql語句
string STstrsql=
//創建SqlDataAdapter的實例
SqlDataAdapter STda=new SqlDataAdapter(STstrsql
//創建DataSet的實例
DataSet STds=new DataSet();
//將信息填充到DataSet
STda
//獲取數據源
STmyGrid
//將信息綁定到DataGrid
STmyGrid
}
//處理分頁
public void STmyGrid_Page(object sender
{
//獲取DataGrid的當前顯示頁的索引
STmyGrid
BindGrid();
}
當單擊DataGrid控件中的
(
//單擊
public void STmyGrid_edit
(object source
{
//獲取DataGrid所要編輯的項的索引
STmyGrid
BindGrid();
}
(
獲取編輯狀態下的文本框中的值
//單擊
public void STmyGrid_update
(object source
{
//根據文本框信息創建更新用戶信息的sql語句
right
From:http://tw.wingwit.com/Article/program/net/201311/15194.html