Posted Thursday, May 3, 2007 @ 04:18:11
Hi,
am trying to move columns based on saved user order from a file
This is how i set up my table:-
1. I insert the first row by refresh(vectorOfVectors)
2. Subsequent rows are created with insert(vector)
3. Then am trying to re-lay the columns according to the saved col order
heres the code:-
while(strtoken.hasMoreTokens() ) {
strcolname = strtoken.nextToken();
System.out.println("COL NAME:"+ strcolname);
odbtable.moveColumn
(odbtable.getColumnByHeaderName(strcolname).getModelIndex()-1,colindex);
System.out.println("COLUMN"+""+strcolname+"MOVED FROM INDEX"+""
+(odbtable.getColumnByHeaderName(strcolname).getModelIndex() - 1)+"TO INDEX"+colindex);
colindex++;
}
My print statement indicates that the columns have moved, But the table displays
the cols in the same original order.
Any idea why column move not working?
Thanx in advance