Editor - Dropdown list
Editor - Dropdown list
mikduc
Posts: 31Questions: 8Answers: 0
in DataTables
I am looking for a working example of a dropdown list in datatables editor. I found an example in the past using ipOpts to build the select list but I am no longer able to locate it.
I want to select an item from the list and pass to a function that can then modify data based on the item selected.
Below is an example of my code:
fields: [
{label: "Location",
name: "LOC_NAME",
type: "select",
def: "",
attr: {style:"width:75px; text-align:center"},
ipOpts: [
{ label: "", value: "" },
{ label: "Chicago", value: "1" },
{ label: "New York", value: "2" },
{ label: "Los Angeles", value: "3" },
{ label: "Miami", value: "4" },
{ label: "San Francisco", value: "5" },
{ label: "London", value: "6" }
]
}
]
This discussion has been closed.
Replies
There are plenty of examples here:
https://editor.datatables.net/reference/field/select