When I have 2 columns in header space is filling for table right and left ...

When I have 2 columns in header space is filling for table right and left ...

RameshKodamRameshKodam Posts: 12Questions: 3Answers: 0

When I have 2 columns in header space is filling for table right and left ...

Please refer below screenshot.

Please suggest how to fix those width issue of Columns ?

Thanks

Answers

  • allanallan Posts: 63,893Questions: 1Answers: 10,531 Site admin

    You don't want the table to take 100% width? If that's the case, then you'll need to remove the 100% width wherever that is being assigned in the CSS or HTML. Without a test case it is impossible to say where that is.

    Allan

  • RameshKodamRameshKodam Posts: 12Questions: 3Answers: 0

    Thanks for great response allan.

    For header th's setting width with '0px' , so if I want to change width of each th where I need to change, please suggest how do I proceed ?

    Thanks in advance.

  • rduncecbrduncecb Posts: 125Questions: 2Answers: 28

    Add a width property to the column definition?
    https://datatables.net/reference/option/columns.width

    If you're using bootstrap you can provide a class for the column such as className: 'col-sm-1' to force a smaller column width.

This discussion has been closed.