Author Topic: how to use paramquery with asp.net mvc  (Read 3203 times)

pranab_nth

  • Newbie
  • *
  • Posts: 1
    • View Profile
how to use paramquery with asp.net mvc
« 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

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: how to use paramquery with asp.net mvc
« Reply #1 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.
« Last Edit: December 03, 2015, 08:12:18 pm by paramquery »