ParamQuery grid support forum

General Category => Help for ParamQuery Grid (free version) => Topic started by: pranab_nth on December 03, 2015, 04:36:07 pm

Title: how to use paramquery with asp.net mvc
Post by: pranab_nth on December 03, 2015, 04:36:07 pm
hi,
i am unable to use paramquery with asp.net mvc.

i have attached the controller file and cshtml file. i am using northwind database.
i get data in json format but not shown in grid.
what is wrong in my grid i don't understand
any help will be appreciated.
thanks
pranab
Title: Re: how to use paramquery with asp.net mvc
Post by: paramvir on December 03, 2015, 08:10:21 pm
As you have copied pasted the code from demo, please change the url in dataModel and ensure that they are pointing to the controllers correctly.

var dataModel = {
            location: "remote",
            sorting: "local",
            dataType: "JSON",
            method: "POST",
            sortIndx: "OrderID",
            sortDir: "up",
            url: "/orders/get",
            //url: "/pro/orders.php",//for PHP
            getData: function (dataJSON) {
                return { data: dataJSON.data };
            }
        }

And better to start from a simple demo ( rather than remote filtering demo ) if it's your first one.