datagrid中的多个复选框选择 [英] Multiple Check box Selection in datagrid

查看:114
本文介绍了datagrid中的多个复选框选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我有一个datagrid(asp.net 1.1),在其中添加了复选框的模板列.如果我选择了多个复选框,并且我正在使用for循环来检查选中了所有复选框,那么我就可以获取相应的选定行.但是在使用查找控件后,如果我正在检查Chk.Checked值,则它总是会变为假.
尝试使用谷歌,但我正在获得SelectALL的示例,但我需要多个选定的行.可以给我一些解决办法吗?
我将复选框的Autopostback属性保持为False.如果我将其保持为True,则一次只能选择一个chkbox.
因此,请让我知道是否有人为此工作.我需要相同的JavaScript函数.
问候
Tanushree

Hi All,
I have a datagrid(asp.net 1.1), in which i have added a template column of Check box. If i select multiple check boxes, and i am using a for loop to check which all check boxes are selected so that i can get the corresponding selected rows. But after using the find Control, if i am checking for the Chk.Checked value its coming false always.
Tried to google, but i am getting the examples of SelectALL, but i need the multiple selected rows. Can some body please provide me some solution.
I am keeping the Autopostback property of the check box as False. if i am keeping it as True, i can select only one chkbox at a time.
So please let me know if anybody has worked on this. I need a javascript funtion for the same.
Regards
Tanushree

推荐答案

请参阅此CP文章以供参考使用DataGrid控件中的复选框以选择记录 [ ^ ].请交叉检查一次.

这些链接也有帮助
How-select-all-checkboxes-datagrid [ ^ ]
Datagrid HeaderCheckbox [
See this CP Article for your reference Using CheckBoxes within the DataGrid control to select records[^]. Please cross check once.

These links also helpful
How-select-all-checkboxes-datagrid[^]
Datagrid HeaderCheckbox[^]


SA,
谢谢回复.作为项目,我目前正在使用的是.net 1.1.
现在必须添加新功能,因此必须在.net 1.1上工作.将更新现有代码库.将按照提供的链接检查链接.

问候
塔努什里·贝赫拉(Tanushree Behera)
Hi SA,
Thanks for the reply. As the project what i am working currently was developed in .net 1.1.
And Now new features has to be added so have to work on .net 1.1.Will be updating the existing code base.Will check for the link as you have provided.

Regards
Tanushree Behera


这篇关于datagrid中的多个复选框选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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