posted 20 years ago
I have found this technique more helpful than setting the column width...
Put all your invisible columns at the end of the data model. For example,
if you have the following data:
Col1 Col2 Col3 Col4
Row1: "abc", "def", "ghi", 123
Row2: "jkl", "mno", "pqr", 456
and you want to hide the third and fourth columns,
all you have to do is
1) Return colNames = {"Col1", "Col2", "Col3" } for your table header
2) return 3 for getColumnCount();
3) in getColumnName(int col)
return (col > 2) ? "" : colNames[col];
Hope that helps. I keep several columns for computation and export purposes only, and have found this method to be very effective.
Thanks,
Ashish