如何使用datagrid分页选择datagrid中的所有复选框? [英] How to select all checkboxes inside datagrid with datagrid pagination?

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

问题描述

大家好,

我有一个启用了分页属性的DataGrid,其页面大小为10,所以总共5个页面.DataGrid每行包含Checkbox。如果我选​​择Select All复选框,我只能选择显示当前页面中的复选框,即该页面中的10个复选框,4页复选框处于未选中状态。我的情况是如果我选择在第1页中选择全部,则应选择DataGrid的每个页面中的复选框。我想在查询或javascript ...



在此先感谢:-)



我有什么尝试过:



我最初在jquery中尝试过javascript,但没有用。

解决方案

< blockquote>为此,



在页面上加载所有数据并通过jQuery控制分页。如果在页面上呈现的所有数据然后您可以轻松找到渲染的控件并选择全部将正常工作 - 找到所有类型复选框的输入并循环通过它们并选择。



谢谢,


Hi all,
I have a DataGrid with paging property enabled and its page size is 10 so totally 5 pages.DataGrid contains Checkbox per row.If i choose Select All checkbox,i can select only displaying checkboxes in current page that is 10 checkboxes in that page remaing 4 pages checkboxes are in unselected condition.My scenario is if i choose select all in 1st page, Checkbox in Every page of the DataGrid should be selected.I want to do it in query or javascript...

Thanks in Advance :-)

What I have tried:

I have tried in javascript initially later in jquery but no use.

解决方案

To do that,

Load all the data on page and control paging through jQuery. If all the data rendered on page then you can easily find the rendered control and select all will work fine through - find all input with type checkbox and loop through them and select.

Thanks,


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

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