Select Type in DataTable
Select Type in DataTable
Paulus
Posts: 69Questions: 17Answers: 5
I have a { label : "label1", value: "value1" } type of data options for a select type. The options are loaded from the server and it works nicely with the Editor.
How to get the table to display the labels instead of the values of the options?
Currently for fixed options, I use the render method of the columnDefs to set the values, but is there a way for dynamic options loaded for the server?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
This example shows how it might be done. You need to include your labels and value in the data object for each row and tell DataTables to display the label, and Editor to edit the value.
Allan
Thanks Allan. Unfortunately, the reply came late and I found a way out; writing the options data in html document before the table initialization and loading it later in the render method like a fixed options.