编辑gridview例子,完整代码如下。
复制代码 代码如下:
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直接编辑,删除经典例子下载
复制代码 代码如下:
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直接编辑,删除经典例子下载
华山资源网 Design By www.eoogi.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
华山资源网 Design By www.eoogi.com
暂无评论...
更新日志
2024年11月18日
2024年11月18日
- ABC唱片-鲍比达·新民乐《满江红》[APE+CUE]
- 许嵩.2014-不如吃茶去【海蝶】【WAV+CUE】
- 周笔畅.2024-HAVE.A.GOOD.NIGHT【SN.Music】【FLAC分轨】
- 周笔畅.2024-HAVE.A.NICE.DAY【SN.Music】【FLAC分轨】
- 证声音乐图书馆《真夏派对 x 迪斯可》[FLAC/分轨][380.78MB]
- 证声音乐图书馆《星空下 爵士钢琴》[320K/MP3][65.88MB]
- 证声音乐图书馆《星空下 爵士钢琴》[FLAC/分轨][283.95MB]
- 沙门怀一《竹山听雨HQ》头版限量[低速原抓WAV+CUE]
- 沙门怀一《于喁·壹HQ》头版限量编号[低速原抓WAV+CUE]
- 群星《魅音绝唱》黑胶CD【WAV】
- 腾格尔.2002-四十独白【风潮】【WAV+CUE】
- 陈明真.1992-到哪里找那么好的人【华星】【WAV+CUE】
- 黄凯芹.2012-廿五年3CD【环球】【WAV+CUE】
- 证声音乐图书馆《七夕 爵士情缘》[320K/MP3][64.8MB]
- 证声音乐图书馆《七夕 爵士情缘》[FLAC/分轨][327.79MB]