asp.net 編輯gridview的小例子_.Net教程
推薦:Asp.net GridView使用大全(分頁實(shí)現(xiàn))關(guān)于GridView的使用涉及很多,網(wǎng)絡(luò)上零零散散的有一些,為了讓自己使用方便,也為了大家能很好的學(xué)習(xí)與工作,我把網(wǎng)絡(luò)上的GridView使用方法收集了一些
編輯例子,完整代碼如下。復(fù)制代碼 代碼如下:hl5o.cn
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
BingGrid();
}
protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
GridView1.EditIndex = -1;
BingGrid();
}
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
try
{
GridViewRow row = GridView1.Rows[e.RowIndex];
string TXB_FORUMNAME = ((TextBox)row.FindControl("TXB_FORUMNAME")).Text.Trim().ToString();
int TXB_ROOTFORUMID = Convert.ToInt16(((TextBox)row.FindControl("TXB_ROOTFORUMID")).Text.Trim());
int TXB_ISDISPLAY = Convert.ToInt16(((TextBox)row.FindControl("TXB_ISDISPLAY")).Text.Trim());
string TXB_MASTER = ((TextBox)row.FindControl("TXB_MASTER")).Text.ToString();
int TXB_ISLOCK = Convert.ToInt16(((TextBox)row.FindControl("TXB_ISLOCK")).Text.Trim());
int LB_FORUMID=Convert.ToInt16(((Label)row.FindControl("Label6")).Text);
ForumBLL.Forum_Update_Name(TXB_FORUMNAME, TXB_ISDISPLAY, TXB_ROOTFORUMID, TXB_MASTER, TXB_ISLOCK, LB_FORUMID);
}
catch (Exception ex)
{
Response.Write(ex);
}
GridView1.EditIndex = -1;
BingGrid();
}
GridView直接編輯,刪除經(jīng)典例子
分享:彈出窗口,點(diǎn)擊確定在刪除數(shù)據(jù)的實(shí)現(xiàn)方法彈出窗口,點(diǎn)擊確定在刪除數(shù)據(jù)的實(shí)現(xiàn)方法,需要的朋友可以參考一下
相關(guān).Net教程:
- asp.net如何得到GRIDVIEW中某行某列值的方法
- .net SMTP發(fā)送Email實(shí)例(可帶附件)
- js實(shí)現(xiàn)廣告漂浮效果的小例子
- asp.net Repeater 數(shù)據(jù)綁定的具體實(shí)現(xiàn)
- Asp.Net 無刷新文件上傳并顯示進(jìn)度條的實(shí)現(xiàn)方法及思路
- Asp.net獲取客戶端IP常見代碼存在的偽造IP問題探討
- VS2010 水晶報表的使用方法
- ASP.NET中操作SQL數(shù)據(jù)庫(連接字符串的配置及獲取)
- asp.net頁面?zhèn)髦禍y試實(shí)例代碼
- DataGridView - DataGridViewCheckBoxCell的使用介紹
- asp.net中javascript的引用(直接引入和間接引入)
- 三層+存儲過程實(shí)現(xiàn)分頁示例代碼
.Net教程Rss訂閱編程教程搜索
.Net教程推薦
- 使用asp.net的pageDataSource中時索引問題解決方法
- ASP.NET如何改變checkboxlist選中項(xiàng)字體顏色
- 深入本機(jī)影像生成器(Ngen.exe)工具使用方法詳解
- ASP.NET應(yīng)用程序資源訪問安全模型
- ASP.NET中用healthMonitor屬性用法
- 編程使用資源文件實(shí)現(xiàn)多語言頁面(In Action)
- asp.net在iframe中彈出信息并執(zhí)行跳轉(zhuǎn)問題探討
- ASP.NET筆記之 ListView 與 DropDownList的使用
- 解析防網(wǎng)站登陸被破解的簡單方法
- VB.NET進(jìn)度條的方法代碼
- 相關(guān)鏈接:
- 教程說明:
.Net教程-asp.net 編輯gridview的小例子
。