Replacing Select (drop down) box with custom component

Replacing Select (drop down) box with custom component

lasazaleaslasazaleas Posts: 1Questions: 0Answers: 0
edited July 2012 in General
Hello,
In DataTable Editor, when adding a new (or editing) a record, the standard Select/Dropdown box shows up for fields defined as:
"type": "select",
"ipOpts":
...

This works fine with single fields, but I'd like to understand if there is functionality to select from multiple levels (when in the back end I have a Category that has a Parent Category, which itself can be a Child Category)

If there is nothing that handles this as part of the Datatable framework, Not sure if that "standard" select/dropdown could be replaced by a custom way of managing select tree views (like jQuery plugin name jsTree, jquery-option-tree -http://code.google.com/p/jquery-option-tree/-)

Hope I made my self clear on the idea

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    Hi,

    Editor's built in field type is relatively simple in that it really is just a single list, so it wouldn't directly do what you are looking for here. However, Editor is designed around the principle of being flexible, particularly for field types - we realise that the built in controls will be good enough for, say, 80% of deployments, but you want the flexibility to define your own custom controls.

    For this there are field type plug-ins in Editor. There is a tutorial on how to work with field type plug-ins here: http://editor.datatables.net/tutorials/field_types . This method could readily be used with the option tree plug-in for jQuery that you linked to to add that field type ability to Editor.

    Allan
This discussion has been closed.