on 12-13-2007 5:19 AM
hi,
ihave data in my table as:
col1 -col2- -col3-
A ........B.......C
A.........B.......D
E.........F.......G
E.........F.......H
But i want it this way:
col1 col2 col3
A........B.......C
....................D
E........F........G
.....................H
Common cols in adjacent rows shuld b invisible.
plz help..
Thank you.
regards,
ankita
hi,
For your requirement you can use TablrPopins (Cell Popin) for the col3.
thanks & regards,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ankita,
Wht is the datasource of your table.
Is it from some model node or you are populating your self.
Can you please tell me?
Regards,
Praveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok fine . do following things in your code.
The node which you are using like "ModelNode".
o Create two more attributes for making your invisible column
o Now bind your those columns with these attributes
o now on the basis of the actual model value you need to populate these values
IWDNode node=wdcontext.nodeModelNode();
for (int i = 0; i < node.size(); i++) {
if(i!=0){
element=node.getElementAt(i-1);
}
String prevalue1=node.getElementAt(i).getattributeValue("colum1");
String prevalue2=node.getElementAt(i).getattributeValue("colum2");
String value1=node.getElementAt(i).getattributeValue("colum1");
String value2=node.getElementAt(i).getattributeValue("colum2");
if(prevalu1!=value1){
node.getElementAt(i).setAttibuteValue("newColumn1",value1);
}
if(prevalu2!=value2){
node.getElementAt(i).setAttibuteValue("newColumn2",value1);
}
}
Now if your values will be repeated it will not add it in the row.
REgards,
Praveen
Hi Ankita,
You can use this after populating the TableNode.
for(int i = 0;i<wdContext.nodeTableNode().size();i++)
{
for(int j = i1;j<wdContext.nodeTableNode().size()-1;j+)
{
if(wdContext.nodeTableNode().getTableNodeElementAt(i).getCol1().equals(wdContext.nodeTableNode().getTableNodeElementAt(j).getCol1()))
{
wdContext.nodeTableNode().getTableNodeElementAt(j).setCol1("");
}
if(wdContext.nodeTableNode().getTableNodeElementAt(i).getCol2().equals(wdContext.nodeTableNode().getTableNodeElementAt(j).getCol2()))
{
wdContext.nodeTableNode().getTableNodeElementAt(j).setCol2("");
}
if(wdContext.nodeTableNode().getTableNodeElementAt(i).getCol3().equals(wdContext.nodeTableNode().getTableNodeElementAt(j).getCol3()))
{
wdContext.nodeTableNode().getTableNodeElementAt(j).setCol3("");
}
}
}
Regards,
Mithu
Hi,
Have you tried grouped colums which is available from NW2004s
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.