Datatable fixed header overflow problem

Datatable fixed header overflow problem

msm_baltazarmsm_baltazar Posts: 59Questions: 22Answers: 0
edited December 2022 in Free community support

For my asp.net mvc project, I decided to use datatable for a table with dynamic number of columns. I create the table in the mvc controller, that is, in the backend, with html tags, send it to the frontend as a response and initialize the datatable. There are text fields in the cells of my table. I wanted to use datatable's fixedheader feature. But when scrolling in the table, the text fields in the cells of the table are not hidden. It creates an ugly image. What could be the source of this problem? May I ask for your help in this matter? I am attaching the before and after of the scroll. I will be very happy if you can help. Thank you very much in advance.

   $("#tableDiv").html(data);/*data is html string of table*/
   $('#myTable').DataTable({
          fixedHeader: true,
          colReorder: true,
          "paging": false,
           "scrollX": true                                       
 });


Answers

Sign In or Register to comment.