How to use dropdown list in Datatable in Inline editing

前端 未结 2 1783
臣服心动
臣服心动 2021-01-05 19:59

I am using datatable 1.8 its amazing, I have recently read an article regarding inline editing of datatable column, Inline editing , in this article on clicking on edit hype

2条回答
  •  清酒与你
    2021-01-05 20:26

    Within my datatable js code:

        function editRow(oTable, nRow) {
            //comes from Razor
            var model = new Object();
            model = insuranceCompanies;
    
            var aData = oTable.fnGetData(nRow);
            var jqTds = $('>td', nRow);
            jqTds[0].innerHTML = '';
            jqTds[1].innerHTML = '';
            for (i = 0; i < model.length; i++) {
                $('#Description').append('');
            }
            jqTds[2].innerHTML = '';
            jqTds[3].innerHTML = '';
            jqTds[4].innerHTML = 'Save';
            jqTds[5].innerHTML = 'Cancel';
        }
    

    On my View:

    @section scripts
    
       @Scripts.Render("~/ScriptsWithDataTables")
       @Scripts.Render("~/Scripts/customajax/patient.insurancecompany.js")
    End Section
    

提交回复
热议问题