Not able to retrieve Column Search data in Controller.

Not able to retrieve Column Search data in Controller.

BhanumathiSubbuBhanumathiSubbu Posts: 1Questions: 1Answers: 0
edited November 2020 in Free community support

I am not able to retrieve the Column search data in my Action Method which shows error on Content Type. Please help

               var dtTblClaimsList = $('#tblAllocationClaims').DataTable({
                ajax: {
                    url: '@Url.Content("~/Workflow/LoadClaimsList")',
                    type: "POST",
                    async: true,
                    cache: false,
                    datatype: "json",
                    contentType: "application/json; charset=utf-8",
                    destroy: true,
                    data: function (d) {
                        d.Page = PageValue;
                        d.SearchConditionFilter = GetJsonData(d, 1);
                        return d.SearchConditionFilter
                    },

                    error: function (result) {
                        console.log("error");
                    }
                },
                columns: [
                    {
                        "orderable": false,
                        data: "claimNo",
                        name: "claimNo",
                        className: 'dt-body-center colId',
                        width: '1%',
                        render: function (data, type, row) {
                                           //Codes
                            }
                    },

                    { data: "fileName", name: "FileName" },
                    //All Data Columns
                ],
                'rowCallback': function (row, data, dataIndex) {
                     //Codes
                },

                "order": [[1, "desc"]],
                serverSide: true,
                processing: true,
                autoWidth: false,
                "lengthMenu": [10, 25, 50, 100, 500],
                dom: 'l<"toolbar">frtip',
                initComplete: function () {
                   //Code to use Export Excel Option
                },
                searching: true,
                language: {
                    processing: "Processing...Please Wait"
                }
            }).columns().every(function () {
                var that = this;
                $('input', this.footer()).on('keyup change', function (ev) {
                    if (that.search() !== this.value) {
                        that
                            .search(this.value)
                            .draw();

                    }
                });

            });

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    This thread should help, it's asking the same thing.

    Cheers,

    Colin

This discussion has been closed.