Gridview可滚动并检查所有功能 [英] Gridview scrollable with check all funcationality
本文介绍了Gridview可滚动并检查所有功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好.
我想使我的gridview可以滚动,并以一列作为ckeck框.标头还包含ckeckbox.
我需要固定的标题,并且所有行都必须滚动.我不需要页面索引.
请帮助
谢谢Advanced
hello guys.
I would like to make my gridview scrollable with one column as a ckeck box. header also contains ckeckbox.
I need fixed header and all rows must scroll. I dont need page indexing.
Please Help
thanks in advanced
推荐答案
你好,
如果将网格视图绑定到具有位类型(SQL)列的数据表,则该列将显示为复选框.您可以通过更新数据表(或源)上的列,使用SP或其他编码将值更改为true/false.
获取复选框作为列标题可能很棘手,但您可能会考虑的是表单上的一个简单复选框(在附近),可用于(取消)选择位变量/列中的所有行,因此gridview取决于其检查状态.
复选框checkchanged属性上的简单循环可能是实现它的最简单方法.
祝你好运.
Hello,
If you bind your grid-view to a datatable with a bit type (SQL) column then that column will be displayed as a checkbox. You can use an SP or some other coding to alter the value to true/false by updating the column on the data-table (or source).
Getting a check-box as column header might be tricky but what you may consider is a simple check-box on your form (some where near) that you can use to (un)select all rows in the bit variable/column and consequently on the gridview depending on its check status.
A simple loop on the checkbox checkchanged property would probably be the easiest way to implement it.
Good luck.
这篇关于Gridview可滚动并检查所有功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文