а

Grid -> ComboBox


#1

Hello,

how can i use the combobox in a cell or better in a column?

Regards
Stephan


#2

Currently such feature is not available, but we’re planning to add it in the next dhtmlxSuite update.


#3

It would also be great to be able to use a custom control. Some grid accomplish this by defining callbacks for each life phase of the editing component. Then the callbacks are called by passing the necessary information to create, destroy or obtain the value of the custom editing component.


#4

such “callbacks for the editing” are already can be accomplished using the
beforeEditStart
https://docs.dhtmlx.com/suite/grid__api__grid_beforeeditstart_event.html
afterEditStart
https://docs.dhtmlx.com/suite/grid__api__grid_aftereditstart_event.html
beforeEditEnd
https://docs.dhtmlx.com/suite/grid__api__grid_beforeeditend_event.html
afterEditEnd
https://docs.dhtmlx.com/suite/grid__api__grid_aftereditend_event.html
events


#5

Hi, yes these events may be useful in other situations, but the callbacks to which I refer usually provide the element of the DOM where the editor must be created. Then the developer can append the custom editor to this element. It would be something like this:

{
         createEditor: function (row, column, value, cellElement) {
                         // Here we can append our custom widget to cellElement and set its current value.
          },

         getEditorValue: function (row, column, value, editor) {
                        // We can call the appropriate method in the editor to get the value.
                         return editor.getValue (); // For example
          }
}

Other callbacks could be provided to initialize and destroy the custom editor. This approach is useful when we need to use an editor that is not implemented in the grid, for example a rating control or a select with live search.