2

I have problem on display datatable. It overflows like in the picture.

enter image description here

I already tried withOption('autoWidth', false), but still not fix.

my html

<form class="bv-form" name="datagridForm" ng-submit="gridSubmitHandler(datagridForm, $event)" novalidate="novalidate">
<table class="inner-dataTable table table-striped nowrap" cellspacing="0" width="100%" datatable="" dt-options="dtOptions"
    dt-columns="dtColumns" dt-column-defs="dtColumnDefs" dt-instance="dtInstanceCallback" id="{{getTableDomId()}}">
</table>

js code

$scope.dtOptions = DTOptionsBuilder.fromFnPromise(function() {
              var defer = $q.defer();
              defer.resolve($scope.tableData);
              return defer.promise;
            })
            .withPaginationType('full_numbers')
            .withOption('oLanguage', {
                oPaginate: {
                    sFirst: "<<",
                    sLast: ">>",
                    sNext: ">",
                    sPrevious: "<"
                }
            })
            .withOption('responsive', {details: {
                // TODO: add configuration in application.xml to determine columns which should stay visible, like Actions:
                //   https://datatables.net/extensions/responsive/classes
                // Doing something like keeping Actions visible on the far right is not really supported yet, the configuration would need to be a bit complex.
                // Some discussion here: https://datatables.net/forums/discussion/22700/responsive-shows-hidden-columns-again/p2
                renderer: responsiveRendererFn
            }}).withOption('autoWidth', false)
            .withOption('createdRow', function(row, data, dataIndex) {
                $(row).addClass("" + data.id);
                CommonFactory.coloringRow(data.statusCode, null, row);
                $compile(row)($scope);
            })
            .withOption('preDrawCallback', preDraw)
            .withOption('deferRender', true)

Thanks

5
  • Check the container width of the datatable Commented Feb 16, 2016 at 7:28
  • We need to see the code to be able to solve that ... Commented Feb 16, 2016 at 7:37
  • @SophonMen please show us your html and css code Commented Feb 16, 2016 at 7:37
  • 1
    I have edited my question with more coding. thanks Commented Feb 16, 2016 at 8:27
  • What is the width of the form container? Itself and its parents Commented Feb 16, 2016 at 9:15

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.