0

Grid using the Checkbox and paging

asked 2012-05-15 15:13:22 +0800

lamwinking gravatar image lamwinking
3

updated 2012-05-15 15:19:44 +0800

Dear All,

Grid using the Checkbox and paging:
a parent Checkbox in the header, which is used to select all child checkbox,
when the status of the parent Checkbox isChecked, how to select all child a Checkbox (including all pages)?

PS. ZK Version: 5.0.9

The code now only select the first page of a Checkbox, not other pages.

JAVA CODE:

Rows rows = grid.getRows();
for (int i =0; i< rows.getChildren().size();i++)
{
Row row = (Row) rows.getChildren().get(i);

if(row.getFirstChild() instanceof Checkbox)
{
Checkbox cb = (Checkbox) row.getFirstChild();
cb.setChecked(target.isChecked());

}
}

ZUL FILE:
<grid id="grid" mold="paging" pageSize="10" vflex="true" style="overflow:auto" pagingPosition="both" >
Regards,
Lam

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2012-07-05 07:21:41 +0800

paowang gravatar image paowang
140 6

An unconsidered idea:
Just detect the check status of parent Checkbox in your application logic.
If it is checked, pretend that all rows are selected in your application logic.
That's it.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2012-05-15 15:13:22 +0800

Seen: 209 times

Last updated: Jul 05 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More