a drowdown list of predefined values based on HTML select

string select;


//for a datatable column
{ header:"Category", editor:"select", options:["","Thriller", "Crime"],  width:80}

Related samples


For better code understanding, select options can be defined in a variable outside the component constructor

var sel_options = {
    "1" : "Thriller",
    "2" : "Crime",
    "3" : "Western"
{editor:"select", options:sel_options}

However, in this case, the necessary data are stored in a dataset in the form of keys ("1", "2", "3") rather than values "Thriller".

See also
  • Articles
  • Back to top