Adding a dropdown as the last column

Adding a dropdown as the last column

phavanagiphavanagi Posts: 13Questions: 5Answers: 0

Hi,
I need to add a drop down to each cell of the last column of my table. I am not sure how to do it. Can you please help?
I have attached the code I have till now.

exeHistoryTable = $("#history").DataTable({
                destroy: true, // To reinitialize the table
                ajax: {
                    url: "http://localhost:57973/api/jobs/jobdetails/" + jobPath,
                    dataSrc: 'ExecutionHistoryList'
                },
                columns: [
                    { data: 'Machine' },
                    { data: 'InstanceId' },
                    {
                        data: 'Status'/*, render: function (data) {*/
                        //    if (data === "Failed")
                        //    {
                        //        var option = new Option(Acknowledge, "acknowledge"); // text,value
                        //        $('select').append($(option));
                        //    }
                        //    return option;
                       // }
                        },
                    { data: 'StartTime' },
                    { data: 'EndTime' },
                    {                                                                   // ( The column which has dropdown on each cell I want to add) 
                    **_ <td class="dropdown" >
                     <form action="" name="FILTER">
                        <select name="filter_for" >
                            <option value="Druck">Druck</option>
                            <option value="Zahl">Zahl</option>
                            <option value="Temperatur">Temperatur</option>
                            <option value="Drehzahl">Drehzahl</option>
                            <option value="andere">andere</option>
                        </select>
                    </form>
                    </td >
_**                    }
                ]
            });

Answers

  • Smti YogyakartaSmti Yogyakarta Posts: 10Questions: 2Answers: 0

    is that drop down will have action to save data when changed?
    if true, i suggest u use editor

This discussion has been closed.