会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
从头再来
只不过是从头再来
博客园
首页
新随笔
联系
订阅
管理
GridView RowCommand 获取列值
//
根据按钮属性,进行操作
protected
void
GridView1_
RowCommand
(
object
sender, GridViewCommandEventArgs e)
{
if
(e.CommandName
==
"
Insert
"
&&
Page.IsValid)
{
BluePrintDataSource.Insert();
SendUserToLastPage
=
true
;
}
if
(e.CommandName
==
"
AddStage
"
)
{
int
index
=
Convert.ToInt32(e.CommandArgument);
DataKey key
=
this
.GridView1.DataKeys[index];
BluePrintID
=
Convert.ToInt32(key.Value);
FormView1.Visible
=
true
;
Label Label2
=
(Label)
this
.GridView1.Rows[index].Cells[
1
].FindControl(
"
Label2
"
);
LabelMessage.Text
=
"
- 您现在正在为项目编号为:
"
+
Label2.Text.ToString()
+
"
添加阶段记录
"
;
}
}
posted on
2008-11-13 15:26
沧海难为水滴
阅读(
642
) 评论(
0
)
收藏
举报
刷新页面
返回顶部