misaligned cells while search

misaligned cells while search

HassanAhmadHassanAhmad Posts: 6Questions: 2Answers: 0

I have jquey datatable with row grouping , fixed columns and scrolling, after search the cells misaligned with the headers

Answers

  • kthorngrenkthorngren Posts: 21,364Questions: 26Answers: 4,956

    The problem could be due to row grouping and fixed columns not being compatible. The Compatibility chart shows this and describes why.

    Kevin

  • HassanAhmadHassanAhmad Posts: 6Questions: 2Answers: 0

    @kthorngren i saw that the fixed columns not compatible with row group , i removed the fixed columns but the issue still exist

  • kthorngrenkthorngren Posts: 21,364Questions: 26Answers: 4,956

    It seems to work with this basic example:
    http://live.datatables.net/koharofa/1/edit

    Maybe you can add to it to show the mis-aligned headers after searching.

    Kevin

  • HassanAhmadHassanAhmad Posts: 6Questions: 2Answers: 0
    edited December 2017

    @kthorngren row page that i used to act as the row spans actually and I have two fixed columns with scrolling and this is my code
    var table = $('#table').DataTable({
    "aaData": data,
    "columns": Columns,
    //Show jquery action buttons
    dom: 'Bfrtip',
    buttons: ['excel', 'pdf', {
    extend: 'print', autoPrint: false
    }],
    scrollY: "400px",
    paging: true,
    scrollX: true,
    scrollCollapse: true,
    "sScrollX": "100%",
    //searching: true,
    paging: false,
    bLengthChange: false,
    fixedColumns: {
    leftColumns: 2
    },

                "rowsGroup": [0]
            });
    
  • kthorngrenkthorngren Posts: 21,364Questions: 26Answers: 4,956

    Like I mentioned before fixed columns and row group are not compatible. I added fixed columns to my example and the fixed columns don't work properly after a search.

    http://live.datatables.net/koharofa/5/edit

    row page that i used to act as the row spans actually

    Rowspan and colspan are not support by Datatables in the tbody of the table.

    Not saying either of those are causing the mis-alignment but just highlighting what is supported and compatible.

    Without seeing the replicated problem its difficult to help troubleshoot. However the developer will probably only work on the problem if its found in a supported config. Can you update my example to show the problem without rowspan and fixed columns?

    Kevin

  • HassanAhmadHassanAhmad Posts: 6Questions: 2Answers: 0

    @kthorngren http://live.datatables.net/koharofa/13/edit and search with d and look what happens

  • HassanAhmadHassanAhmad Posts: 6Questions: 2Answers: 0
This discussion has been closed.