Individual column Search and Cell Edit is not working with Fixed columns in datatable

Individual column Search and Cell Edit is not working with Fixed columns in datatable

umenderreddyumenderreddy Posts: 1Questions: 0Answers: 0
edited June 2018 in Free community support

Individual column Search and Cell Edit is not working with Fixed columns in data table..Below is my Jquery .

 var table2=$('#table_detail').DataTable({
                "processing": true, // for show progress bar
                "autoWidth": false,
                "serverSide": false, // for process server side
                "filter": true, // this is for disable filter (search box)
                "paging": false,
                "pagelength": 5,
                "idisplaylength": 1,
                "scrollX": true,
                "scrollY": "300px",
                "scrollCollapse": true,
                //"dom": '<"top">rt<"bottom"flp><"clear">',
                "scrollCollapse": true,
                "ajax": {
                    url: myurl
                    dataType: "json",
                    type: "post",
                    "data": { ID: getParameterByName("ID"), iscompleted: getParameterByName("iscompleted") }

                },
                "fixedColumns": {
                    "leftColumns":2
                },


 $('#table_detail thead th:gt(12)').each(function () {
                //  $('#table_detail  thead  th  ').each(function () {

                var title = $(this).text();
                var index = $(this).index();

                //   $(this).html('<input   type="text"  size="3"  />');

                $(this).html('<input onclick="stopPropagation(event);"  type="text" class="h_search"  style="Color: black;" size= "16" placeholder=' + title + ' />');
});

 var table = $('#table_detail').DataTable();
            //
            // Apply the search
            table.columns().every(function (index) {
           
                $('.dataTable thead tr:eq(1) th:eq(' + index + ') input').on('keyup change', function () {
                    alert(index);
                    table.column($(this).parent().index() + ':visible')
                        .search(this.value)
                        .draw();
                });
            });

// Here i applied fixed column feature  for First left column,

The Cell Edit & Individual column search is not working for first columns .. But it is working for other columns

Please help on this ..

Thanks in advance

Replies

  • colincolin Posts: 15,176Questions: 1Answers: 2,589

    Hi @umenderreddy ,

    Would you be able to create a fiddle that demonstrates this, with instructions on how to create your problem? It's not clear from just the code what the issues are. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

This discussion has been closed.