FNC Grid Questions

If I set CellClassType to Radiobutton, is it possibe to assign e.g. Yes/No/Unknown in a Cell. Or does this also count as more than one control?


Is it possible to create a custom checklistbox with several values ?

Is it possible to create a custom drop down with a small form inside?

Hi,


CellClassType needs to inherit from TTMSFNCGridCell, you can create your own descendant class. There is already a TTMSFNCRadioGridCell which represents a radio button. You can assign a Boolean value with TMSFNCGrid1.Booleans[ACol, ARow] property. It is possible to create custom editors via various events. The manual has additional information on the events that are needed to support a custom editor. Please note that this involves an inplace editor that is only shown when editing. A permanent editor for each cell needs to be handled in a different way.

I would like to display a small panel with several controls as cell editor aligned with the cell (overlapping completely) depending on where the cell currently is. Would you mind giving me a hint how to accomplish that for VCL and WEB? I think a CustomCellEditor would be fine. Behind the scenes I store a JSON record that is processed for display in getCellData.


Example: The Cell either holds a value with the unit of measure "cm" or "inch" or the string "unknown". The json would be {"value":"12","uom":"cm"} or {"Unknown":"true"}. It is easy to translate this into a cell string. On editing I want to feed that into a form on a panel consisting of two edit controls and one checkbox. A Validation routine makes sure that only one of the fields is filled. On Exiting the panel the value is fed back as JSON and the new value is displayed. On Saving the JSON goes to the database. I think this sohould be doable?

It is not feasable to put all this into individual fields as this was a very simple example, there are others where one cell content is made up of 20 alternatives of different kinds of values allowing only some combinations.

I think I found a way to do it by overlaying a panel and embedding forms without using the grid editor. Sorry for bugging.