on 07-18-2007 6:51 AM
Hi,
Can any one please help me in finding such a control in Web DynPro which is like a table and has the option to select or deselect all the rows of the table?
Regards,
Smriti.
HI Smriti,
Insert one mode column to the table with Chechbox as editor. Create a boolean context variable (Check) inside table node and bind to Checked Property.
Create 2 buttons, Select All and Deselect All.
In SelectAll button's action, write this code
IPrivate<View>.I<Table>Node tNode=wdContext.node<Table>().;
for(int i=0;i<tNodesize();i++)
{
tNode.get<Table>ElementAt(i).setCheck(true);
}
In DeselectAll button's action, write this code
IPrivate<View>.I<Table>Node tNode=wdContext.node<Table>().;
for(int i=0;i<tNodesize();i++)
{
tNode.get<Table>ElementAt(i).setCheck(false);
}
Regards
Fahad Hamsa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How about this?
create a toolbartogglebutton and onaction, do something like this
// toggleSelect to record the state of button
boolean tf = wdContext.currentContextElement().getToggleSelect();
// assume you have the node call projects
wdContext.nodeProjects().setLeadSelection(-1);
if (tf){
for (int i = 0; i < wdContext.nodeProjects().size(); i++) {
wdContext.nodeProjects().setSelected(i,false);
};
wdContext.currentContextElement().setToggleSelect(false);
} else {
for (int i = 0; i < wdContext.nodeProjects().size(); i++) {
wdContext.nodeProjects().setSelected(i,true);
}
wdContext.currentContextElement().setToggleSelect(true);
}
So you can toggle between select all and deselect all.
Yung siu wai
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.