Show values in select box in a dt

Show values in select box in a dt

dynasoftdynasoft Posts: 439Questions: 68Answers: 3

Hi

I know I can do the following:

                { data: 'CustomerVoiceCLIPriceLists' ,
                    render: "[, ].PriceList",
                    className: 'text-left'
                },

But I would like to show the values (ie the price list names under PriceList above) in a select box but I'm not sure how to initialise the string with the <select> bit to have something like this:

                { data: 'CustomerVoiceCLIPriceLists' ,                      
                    render: "[<option value=].PriceList>.PriceList</option>",
                    className: 'text-left'
                },

and return the options inside <select> and </select>. Thank you.

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Hi @dynasoft ,

    That's a bit beyond the shorthand - you would need to make columns.render a function and iterate through the data parameter to create the HTML element list of checkboxes.

    Cheers,

    Colin

  • dynasoftdynasoft Posts: 439Questions: 68Answers: 3

    Hi

    Eventually got it to work like I wanted. Many thanks.

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Did you use a function, or your shorthand?

This discussion has been closed.