on 08-06-2008 5:55 AM
Hi All
i need to develop a table in webdynpro
in that table in last colunm i have add and delete button
on clicking add button i need to add a row immediatly to next row
upon pressing delete button i need to delete the current row
Please gudie me how to handle this
Thanks
Karthi D.
hi
For deleting the current row you do like this.
onActionDelete(..){
wdContext.nodePerson().removeElement(wdContext.nodePerson().currentPersonElement());
}
For adding a row
onActionadd(..)
{
IPrivateFirstCompView.IPersonElement pelement=wdContext.nodePerson().createPersonElement();
pelement.set<attriute>(....);
wdContext.nodePerson().addElement(pelement);
}
(or)
if you want add a row in particular position,you can do this.
i-->position
IPrivateFirstCompView.IPersonElement pelement=wdContext.nodePerson().createPersonElement();
pelement.set<attriute>(....);
wdContext.nodeT_Return1().addElement(i,pelement);
I hope this will solve your problem.
Regards
sowmya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To Add
onActionAddNewRow()
IPublic<componentName>.I<NodeName>Element element = wdContext.create<NodeName>Element();
wdContext.node<NodeName>().addElement( element);
To delete:
onActionDeleteRow()
IPublic<componentName>.I<NodeName>Element element = wdContext.current<NodeName>Element();
wdContext.node<NodeName>().removeElement( element);
nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Just get the index of the current selected row using
int index = wdContext.node<nodename>().getLeadSelection();
for adding a row immediately below this
create an element of the node type
IPublic<componentName>.I<nodename>Element ele = wdContext.node<nodename>().create<nodename>Element();
Add this element at the index
wdContext.node<nodename>().addElement(index,ele);
For removing the current element
wdContext.node<nodename>().removeElement(wdContext.node<nodename>().current<nodename>Element());
Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.