on 2006 Feb 15 4:46 PM
i have a requirement to select all check boxes if user checks the "all" check box.
i wrote the following code wdDoModifyView, its checking the check boxes but i can see only after clciking search button on te view.
IWDCheckBox chkall= (IWDCheckBox) view.getElement("All");
IWDCheckBox nameChk=
(IWDCheckBox) view.getElement("name");
IWDCheckBox mailChk=
(IWDCheckBox) view.getElement("mail");
if(chkall.getChecked()==true){
mailChk.setChecked(true);
nameChk.setChecked(true);
}
tahnks,
Damodhar.
Damodhar,
1. First, bind "checked" property of ordinary check boxes to context attributes (type boolean).
2. Second, create action handler for "ALL" check box, in this handler iterate over attributes and set element value to true for every attribute.
Valery Silaev
EPAM Systems
P.S. From usablity point of view it is better to implement "All" as a link2action rather then check box. Or additionaly you may disable all ordinary check-boxes when All is clicked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
if user checks "all" check box, then he must see the check marks for "Name" and "mail" in the browser.
i hope this give some idea.
example:
http://javascript.internet.com/buttons/check-all.html
i can set the checked value to true, but i have to show user in the browser in the runtime.
Thanks,
Krishna.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Silaev,
I did same process as you mentioned, it's working fine for setting checked property to true.
My problem i want to show the user check mark for all check boxes if checks the all check box apart fro above.
Thanks,
Damodhar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Damodhar,
May be it is better to set node element selection for data node which is bound to checked property.
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.