Can the content of a grid column/cell be mapped to a dropdown set of values


#1

I have a “state” column in my grid - the data for this is numeric - is there a way to have the contents of the cell mapped to a text value (in a dropdown).

I am fimilar with the selectFilter, which allows selection of a text value

{ 
    width: 160, id: "status", 
    header: [{ text: "Status" }, { content: "selectFilter" }],     editorType: "select", 
    options: ["Initial", "Assigned", "In Progress", "Done"] 
}

However, is there an abilty similar to Gantt whereby you can load an array for selection - showing the “label” or “text” and storing the “key” or “value”?


#2

Unfortunately there is no value-label scenario for the select editor.
You may try to assign a template to your column, where you can replace the values with the needed labels:
https://docs.dhtmlx.com/suite/grid__customization.html#addingtemplatetocells


#3

@sematik hi

That’s a shame - I will take a look at that.

Perhaps you would consider a cheeky feature request for the sake of consistency between components :wink: