Reputation: 938
I have a simple table with 2 columns Property Name and Value which display the properties of the selected object. It is working fine.
The properties could be things such as name, height, width, colour.
I would like the user to be able to edit the cells, but the appropriate formatter to apply to the cell they are editing.
For example, if editing the name cell it would just be text. height would be numeric, colour would be colour, visible maybe a tick/cross or a select.
Looking at the documentation it is geared (sensibly) to have 1 formatter to a column as it assumes that columns data will all be of the same type.
Is it possible to have a mix of formatter types for a single column?
Upvotes: 1
Views: 1301
Reputation: 8398
You can only assign formatters at the column level not the cell level, but there would be nothing to stop you creating your own custom formatter function that output the correct formatter element depending on the type of cell it was applied to.
There are detailed instructions on creating your own custom formatters in the Custom Formatter Documentation
Upvotes: 2