lengthMenu not working if I render dataTable through ajax?

lengthMenu not working if I render dataTable through ajax?

karanlkaranl Posts: 6Questions: 3Answers: 0
edited January 2018 in Free community support
$.ajax({
                            type: "GET",
                            url: "/controller/action",
                            success: function (data) {
                                debugger
                                $("#_Grid").empty();
                                $("#_Grid").html(data);
                            },
                            error: function (xhr, ajaxOptions, thrownError) {
                                modalMessage('Failed to Load _ExpLevelGrid.', "danger");
                            }
                        });

the action method returns partial view of datatable

EDIT: update post to use back ticks (```) for code display

Answers

  • kthorngrenkthorngren Posts: 21,303Questions: 26Answers: 4,947
    edited January 2018

    Are you receiving any alerts or console log errors?

    Maybe you can post more of your Javascript code to see exactly how you are using your ajax request with Datatables. Also please post the data returned in the ajax response. This tech note provides the steps to collect this info.

    Kevin

This discussion has been closed.