on 10-03-2007 1:16 PM
Hi all,
I want to Select/Deselect all check boxes in my table using single button. I tried using single button ,but it is not working correctly for all the cases.
Thanks®ards,
karthik.
Hi Karthikeyan
1) Create Context Attribute "<b>Selected</b>" of type Boolean and bind the "<b>Selected</b>" value attribute to "<b>CheckBoxUIElement's</b>" <b>checked</b> property
2)Create a ToggleButtonUIElement
3) Bind "<b>Selected</b>" to <b>checked</b> property of ToggleButtonUIElement
4)Create action and bind that to <b>onToggle</b> property of ToggleButton
5)Do the Following
if(wdContext.currentContextElement().getSelected())
wdContext.currentContextElement().setSelected(true);
else
wdContext.currentContextElement().setSelected(false);
Regards
Chaitanya.A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi! Karthi,
Richard Armit has answered this problem in a very descriptive way, find that blog and get the solution.
regards,
Mithileshwar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi karthik..
You can do this ..
1.Create boolean variable..
2.Create Select all button..
write this code in Select all action ..
IPrivate<View>.I<Table>Node tNode=wdContext.node<Table>().;
for(int i=0;i<tNodesize();i++)
{
tNode.get><Table>ElementAt(i).setCheck(true);
}
Like Deselect all..
IPrivate<View>.I<Table>Node tNode=wdContext.node<Table>().;
for(int i=0;i<tNodesize();i++)
{
tNode.get><Table>ElementAt(i).setCheck(false);
}
Urs GS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi karthik, do you mean you want togglebutton? when it is pushed, select all, and when it is up, deselect all?
If yes, try to use the ui element togglebutton. You use it the same way as button, but the look and feel of togglebutton is differnet than button. Try it, maybe this is what you want.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.