on 06-04-2010 4:42 AM
Hi All,
I have requirement in which I have to delete a table record from bothe the node and the display in the view. How can I go about with this?
Thank you
Regards,
Preet
Hi,
If you are using some button to delete the row of a table, then in the action method of the button write the below piece of code
if(wdcontext.node<nodename>.size()>0){
int leadSelectedRow= wdcontext.node<nodename>.getleadselection();
wdcontext.node<nodename>.removeElement (wdcontext.node<nodename>.getElementAt (leadSelectedRow);
}
hope this helps you
amit bagati
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
1.Cretae a context attribute of type int:va_visirowCount
2.Go to layout->select the table->properties->Visisbleroucount
and select the value from context cattribute:va_visirowCount
3.In the code
wdContext.currentContextElement().setva_visirowCount(wdContext.nodeTable().size());
Regards,
Lavanya.G
Hi ,
Add a extra column in the table with the link name delete.
On click on that link write the below code:
wdContext.nodeTable().invalidate();
int n = wdContext.nodeTable().size();
int leadSelected = wdContext.nodeTable().getLeadSelection();
for (int i = n - 1; i >= 0; --i) {
if (wdContext.nodeTable().isMultiSelected(i) || leadSelected == i) {
wdContext.nodeTable().removeElement(wdContext.nodeTable().getElementAt(i));
}
}
Regards,
Lavanya.G
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.