选中复选框之一时,如何检查DataList内部的所有复选框? [英] How to check all checkboxes which is inside DataList when one of the check box is checked?

查看:129
本文介绍了选中复选框之一时,如何检查DataList内部的所有复选框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个DataList ,其中有CheckBoxes 的列表从后端获取数据.其中,值之一是"ALL".如果选中这一切复选框,然后我想在DataList控件的所有其他复选框应作为托运真正否则后果不堪设想.其他所有复选框均应禁用.
用户不应该同时选中所有"和其他复选框....这就是我的想法.
您能尽快帮助我吗?

Hi,
I am having one DataList which is having list of CheckBoxes geting data from Backend. In that one of the value is "ALL". When this ALL checkbox is checked then I want to all other checkboxes in the DataList should be checked as true or else. All other checkboxes should be disabled.
User shouldn''t not check both "ALL" and also some other check boxes.... that is my idea.
Can u plz help me as soon as possible?

推荐答案

禁用DataGrid/GridView中的复选框是几天前才被问到的.这是链接: http://www.codeproject.com/Answers/105433/select-all -checkboxes.aspx [ ^ ].检查我的答案.

我建议您在问任何问题之前先进行搜索.他们中的大多数人都已经被回答了,如果您可以通过简单的Google搜索获得答案,何必打扰别人. :thumbsup:
Disabling CheckBoxes in a DataGrid/GridView was asked couple of days back here. Here is the link: http://www.codeproject.com/Answers/105433/select-all-checkboxes.aspx[^]. Check my answer.

I suggest you to do a search before asking any question. Most of them are already answered so why bother someone if you can get an answer by simple Google search. :thumbsup:


这篇关于选中复选框之一时,如何检查DataList内部的所有复选框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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