posted 19 years ago
Hi,
Does anyone know how to reset column names, properties, etc dynamically. For instance, my application allows the user to add rows as well as columns. When a new row is added to the input, it appears in the table viewer upon refresh(). But what do I have to do to force a new column to appear when the user chooses to add one.
Currently, I'm doing these steps:
1. Making a call to TableViewer::setColumnProperties() with the new column names.
2. Reformatting TableViewer::getTable() to include new columns.
3. Resetting TableViewer::setCellEditors() to create the correct number of editors as a result of adding a column.
But having no joy with this:-(. If I step through the code, it has the new column name both in table viewer's properties as well in the column names of TableViewer::getTable(), but it just wouldn't redraw the table.
Have spent too much time on this. Any help would be greatly appreciated!
Jay