on 09-20-2006 6:51 AM
Hi all,
After deleting any rows/row in the WebDynpro table it is showing one blank row showing the presence of row there already. This blank row is appearing when we add new row next time. I don't want to appear this blank line after deleting the row. I Used
wdContext.nodename().removeElement();
removeElement() to delete the row.
Is there any other possibilities to avoid this.
Plz let me know.
Hi,
if you want to delete a row in a table use the follwing code,
IWDNodeElement e=wdContext.node<Nodename>().getElementAt(position); //position refers the number of the row which is going to be deleted.
wdContext.node<Nodename>().removeElement(e);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI
How many rows i am deleting that much blank rows are available. Here is the code which i used,
int leadSelected=wdContext.nodename().getLeadSelection();
for(int i=r2-1;i>=0;--i)
{
if(wdContext.nodename().isMultiSelected(i)||leadSelected==i)
{
wdContext.nodename().removeElement(wdContext.nodename().getElementAt(i));
}
}
plz reply.
Hi,
Try this code, it may use full for you.
<b>Removing Element</b>
ITestNodeElement ele = (ITestNodeElement) wdContext.nodeTestNode().getElementAt(wdContext.nodeTestNode().getLeadSelection());
wdContext.nodeTestNode().removeElement(ele);
<b>Adding Element to the node</b>
ITestNodeElement testNodeELe = null;
testNodeELe = wdContext.nodeTestNode().createTestNodeElement();
testNodeELe.setTest1("Second ");
testNodeELe.setTest2("Third ");
wdContext.nodeTestNode().addElement(testNodeELe);
It is working fine for me.
Note: - TestNode is the node and Test1 and Test2 are the two elements in the node
Regards,
Sridhar
krishnaveni,
Now it's hard to understand where is the problem.
Try the following:
1. Make sure that cardinality of node used as Table.dataSource is 0..n (not 1..n)
2. Create calculated read-only attribute of type integer, bind visibleRowCount to this attribute and add the following code as calculated attribute "getter":
return Math.min(wdContext.nodeTableDataSource().size(), 5);
Valery Silaev
EPAM Systems
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.