Hi,
I am using SGWT 3.0 and evaluating options for one of my requirement. I need a grid like capability with support for column editing, i.e. once the Grid is rendered based on the data from the server, i should be able to add/remove/rename columns.
I couldn’t find any relevant examples around this. Firstly does SGWT provide support for column editing? If not what would be the best option to do this.
Thanks,
Vicky
Show and hide of columns is built-in and on by default. Wizards for ends users to make their own formula or summary columns are also built in (see canAddFormulaFields). It would be easy to add a context menu to rename a column. If these aren’t what you’re looking for, be more specific.
For show/hide of columns all the columns will need to be available upfront. However what if once the grid is rendered, i want to add a new column or remove one of the existing ones.
Once all the editing is done, i want to be able to extract the final data. E.g.
Server send, col1 | col2 | col3
After modifications(add/delete/rename) the grid now has columns col11 | col3 | col4
Here, col1 got renamed to col11, col2 got deleted and col4 got added.
Eventually once i try fetching the data to send it back to the server to persist, i would typically expect data only against the final set i.e. col11 | col3 | col4.
Let me know if this clarifies what i am looking for.
Thanks,
Vicky
It doesn’t really clarify, except that perhaps you didn’t notice there’s a setFields() API?
Ok, so setFields() can be called even after the grid is rendered to add/remove columns.
I’ll try using this API and see if helps my case.