joeharrison714 / MVCGrid.Net

http://mvcgrid.net
MIT License
75 stars 56 forks source link

Odd JSON error on Global Search #116

Open pjdupreez opened 7 years ago

pjdupreez commented 7 years ago

So I have implemented the Grid as shown on the site and have the sorting and ordering working. This grid is by far the best one I have used to date, but when I tried to implement the Global Search, I get a very odd JSON error in Chrome's Console:

Pricing:1 Uncaught SyntaxError: Unexpected token u in JSON at position 0 at JSON.parse () at Function.jQuery.parseJSON (jquery-2.2.4.js:7964) at getClientData (script.js:192) at Object.getAdditionalQueryOptions (script.js:367) at HTMLInputElement. (script.js:85) at Function.each (jquery-2.2.4.js:365) at jQuery.fn.init.each (jquery-2.2.4.js:137) at loadAdditionalQueryOptions (script.js:81) at bindToolbarEvents (script.js:102) at Object.init (script.js:30) ​

I am using the _MVCGridToolbar.cshtml and MVCGridToolbarModel.cs as can be downloaded on the Global Search page of the the site and added the code to my View as shown in the example (only changed the grid name to match with my grid's name).

When my page loads, the grid gets loaded and the above error is given in the console.

Am I missing anything?