Fixed Filtering not working

Fixed Filtering not working

rahulcapgemirahulcapgemi Posts: 8Questions: 3Answers: 0
edited May 2018 in Free community support

Hello All ,

I have create a data table , which load data via ajax . Table having a 3 fixed column.

when I am trying to filtered any values,Filtering work fine for Fixed column . But non-fixed not filtered correctly .

I am working to produce same scenario of fiddle as well . If any one has some solution,Please let me know

Same kind of functionality I have implemented in other pages.But that page does not have ajax call .

Please suggest if I am missing any attributes

  oTable = $("#cluster_list").DataTable({
    "ajax": json_data_file,
    //this will show loading message when data is loading from json file
    "language": {
      "processing": "Loading data...",
      "emptyTable": "",
      "zeroRecords": ""
    },
    "processing": true,
    "scrollY": "400px",
    "scrollX": "100%",
    "scrollCollapse": true,
    "paging": false,
    "dom": '<"top"i>B<"clear">lrtp',
    buttons: [{ extend: 'excel', text: "Save to xls", "filename": filename, exportOptions: { columns: [':visible'] } },
      { extend: 'csv', text: "Save to csv", "filename": filename, exportOptions: { columns: [':visible'] } },
      { extend: 'copy', text: "Copy to clipboard", exportOptions: { columns: [':visible'] } },
      { extend: 'print', text: "Print", exportOptions: { columns: [':visible'] } }],

    fixedColumns: {
      leftColumns: 3
    },

    "columns": [
      {}, //customer name
      {}, //cluster name
      {}, //cluster id
      { "visible": false },
      { "searchable": false },
      { "visible": false },
      { "orderData": [5] }
      { "visible": false },
      {},
      { "visible": false },
      { "visible": false },
      { "orderData": [10] },
    });

  $(oTable.table().container()).on('keyup', 'thead input', function() {
    oTable
      .column($(this).data('thindex'))
      .search(this.value)
      .draw();
  });


  }, );

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @rahulcapgemi

    That live fiddle would help with this one - there's a lot going on with those columns.

    Cheers,

    Colin

This discussion has been closed.