Select field not showing current value

Select field not showing current value

klinglerklingler Posts: 90Questions: 42Answers: 2

Good day (o;

Being a while I used datatables editor for an internal online tool..

Now I do a redesign and face a problem when editing a shopping cart row that the currently stored value is not reflected in the editor dial. Instead it shows the first value returned form the "Options" json...

The editor part is defined as:

            label: "Projekt",
            name: "project",
            type: "select"

And the datatable part as:

            { "data": "Projekt" },

The returned json looks like:

{
"data": [
{
"DT_RowId":"301",
"Lieferant":"Digi-Key Electronics",
"Projekt":"Sensor+ AD",
"projectid":"138",
}
]
"project": [
{
"label":"1027:TLC ReDesign",
"value":46
}
]
}

I followed this example: https://editor.datatables.net/examples/simple/join.html
but must have missed something in the editor setup...

thanks in advance
richard

Answers

  • klinglerklingler Posts: 90Questions: 42Answers: 2

    Ah think I got it now (o;

    The "project" has to come from "data" as well as from "options"....
    So Tables picks up from data and Editor from options....

    Case closed (o;

This discussion has been closed.