Moving away from sDom and being able to reload my table

Moving away from sDom and being able to reload my table

tokyo0709tokyo0709 Posts: 1Questions: 1Answers: 0

So we kind of inherited an old syntax with datatables that has been giving us a lot of headaches lately. sDom. I would like to if possible move away from using this format towards something else that gives us more flexibility over the code but am not sure where to turn to. We are also looking to reload our table but can't quite figure out what to do.

This is our basic table setup function at the moment,

$('#in_progress').dataTable({
        "sDom": "<'dt-toolbar'<'col-xs-12 col-sm-6'f><'col-sm-6 col-xs-6 hidden-xs'C>r>" +
            "t" +
            "<'dt-toolbar-footer'<'col-sm-6 col-xs-12 hidden-xs'i><'col-xs-12 col-sm-6'p>>",
        "autoWidth": true,
        "preDrawCallback": function () {
            // Initialize the responsive datatables helper once.
            if (!responsiveHelper_in_progress) {
                responsiveHelper_in_progress = new ResponsiveDatatablesHelper($('#in_progress'), breakpointDefinition);
            }
        },
        "rowCallback": function (nRow) {
            responsiveHelper_in_progress.createExpandIcon(nRow);
        },
        "drawCallback": function (oSettings) {
            responsiveHelper_in_progress.respond();
        },
        "order": [[2, "asc"]]

    });

I'd like to maintain the functionality but move away from sDom and also be able to reload the table. We are currently on DataTables 1.10.6

This discussion has been closed.