网格视图复选框选中和取消选中问题 [英] Grid view check box check and uncheck problem

查看:79
本文介绍了网格视图复选框选中和取消选中问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网格视图,其中包含将近1000个带有复选框的数据.我已选中标题的所有复选框.当用户通过javascript iam遍历并检查grid中的所有chekbox时,检查了select all chekbox的标题.但是它对于1000条数据记录工作正常,但是当它为5000时,则iam获取此页面上的脚本会导致慢慢跑.

因此,有什么解决方案可以不循环地检查网格中的所有复选框.解决此问题

预先感谢

Hi i have a grid view which contains nearly 1000 of data with check box.I had select all check box at the header . when user checks on the header of the select all chekbox Through javascript iam looping and checking all the chekbox in the grid.but it is working fine for the 1000 records of data but when it is 5000 then iam getting A script on this page is causing to run slowly.

Hence is there is any solution to check all the checkbox in the grid with out looping .to solve this problem

THanks in advance

推荐答案

你好

我认为没有更好的解决方案.但是您可以提高性能.在这里查看:包含大量元素的循环问题Javascript

顺便说一句:为什么要同时显示1000或5000个项目?
Hello

I don''t think that there be a better solution. But you can improve the performance. Look here: Javascript for loop issue with large number of elements

By the way: Why do you want to show 1000 or 5000 items simultaneously? use Paging instead.


您应该为此问题在多页中拆分网格并提高页面性能
You should break your grid in multiple pages for this problem & will increase the page performances


与他人达成协议&本文适合您.
维护GridView内部不同页面中选定复选框的状态 [ ^ ]

另外,别忘了查看该作者的其他文章.
Agree with others & this article is for you.
Maintaining States of Selected CheckBoxes in Different Pages inside the GridView[^]

Also don''t forget to check other articles by that author.


这篇关于网格视图复选框选中和取消选中问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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