zoukankan
html css js c++ java
GridView模版列中根据数据动态添加RadioButtonList项
aspx
<
ItemTemplate
>
<
asp:HiddenField
ID
="hditem"
runat
="server"
Value
='<%#
Eval("item") %
>
' />
<
asp:RadioButtonList
ID
="rblidea"
runat
="server"
RepeatDirection
="Horizontal"
RepeatLayout
="Flow"
>
<
asp:ListItem
Value
="1"
>
同意
</
asp:ListItem
>
<
asp:ListItem
Value
="0"
>
不同意
</
asp:ListItem
>
</
asp:RadioButtonList
>
</
ItemTemplate
>
cs:
protected
void
GridView1_RowDataBound(
object
sender, GridViewRowEventArgs e)
{
int
strid
=
e.Row.RowIndex;
RadioButtonList rbliea
=
(RadioButtonList)e.Row.FindControl(
"
rblidea
"
);
Button btnSubVise
=
(Button)e.Row.FindControl(
"
btnSubVise
"
);
HtmlInputButton hReSubVise
=
(HtmlInputButton)e.Row.FindControl(
"
ReSubVise
"
);
if
(rbliea
!=
null
)
{
if
(((HiddenField)e.Row.FindControl(
"
hditem
"
)).Value
==
"
3
"
)
{
//rbliea.Items.Insert(
2
,
"
需客户核准
"
);
rbliea.Items.Insert(2, new ListItem("需客户核准", "2"));
btnSubVise.Visible
=
false
;
hReSubVise.Visible
=
false
;
}
}
}
查看全文
相关阅读:
normalize.css介绍和使用,normalize与CSS Reset的区别
解决在Windows10没有修改hosts文件权限
定时器
常见代码题
BFC与margin重叠
清除浮动的方法以及优缺点
面向对象的理解
左边固定右边自适应
正则
《STL源码剖析》——第一、二、三章
原文地址:https://www.cnblogs.com/cnaspnet/p/669415.html
最新文章
CSS选择器的兼容性
DIV+CSS常见问题:DIV如何设置一个像素高度?
CSS hack大全
CSS、CSS2和CSS3选择器总结(全部选择器种类及其优先级)
CSS常用十大技巧
CSS垂直水平完全居中手册
前端开发面试题
AppServ的安装与配置
Face++接口封装
JS Date
热门文章
解决 全屏 布局
BM25算法
解决 多列 布局 左右等高问题
解决 等分 布局
解决 多列 布局
解决 居中 问题
FE 开发流程
开启新的生活状态
聊天 WH
css3中translate、transform和translation,以及动画animation
Copyright © 2011-2022 走看看