如何在网格上的行命令中启用我的所有链接按钮. [英] How to enable all my linkbuttons in my grid on row command.

查看:54
本文介绍了如何在网格上的行命令中启用我的所有链接按钮.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

在网格中,我有开始和停止链接按钮.假设我有5行数据.
因此5行开始和停止链接按钮将自动出现在网格中.
现在的任务是,如果我单击第一行中的开始"链接按钮,则会自动
我的所有停止链接按钮都处于启用的false下.
怎么可能?
我在Row_Command中编写了该行的stop linkbutton启用为false.

问候,
VenkateshDesai.

Hi All,

In grid i have start & stop linkbuttons.Suppose i have 5 rows of data.
so automatically 5 rows of start & stop linkbuttons will appear in the grid.
now my task is that if i click on start linkbutton in first row then automatically
my all stop linkbuttons are come under enabled false.
How it is possible??
i wrote in Row_Command my stop linkbutton is enabled false for that single row.

Regards,
VenkateshDesai.

推荐答案

在Item Commond事件中,将您的值保存在视图状态中,例如ViewState ["start"] = true;
在ItemDatabound事件中,检查此viewstate值并启用或禁用所有行.

如果网格有5行,那么ItemDatabound事件将调用5次.因此,U可以禁用所有按钮.
In Item Commond event save your value in a view state like ViewState["start"]=true;
In the ItemDatabound event check this viewstate vale and enable or disable all the rows.

If your Grid has 5 rows then your ItemDatabound event calls 5 times.so,U can disable all the buttons.


这篇关于如何在网格上的行命令中启用我的所有链接按钮.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆