jqgrid sort and paging problem -


I am implementing a jqgrid based on online examples. Data is coming, but the sort / page is not working I'm narrowing down the problem which is: Parsing errors due to special characters (in my case '(') in json.responsetext so i have in my jquerySpecialCharHandler.js He did not help on the page tried to include. I will include my page and my controller action / function here.

  jQuery (document) .ready (function () {jQuery ("# List") .jqGrid ({url: '/ Home / Dynamic Gridata', Day ['Name:' 'policy', 'policy rule', 'alert status',' alert code ',' message ',' category '], colomodel:' [Jurisdiction: 'Jason', mitip: 'GET' The 'policy', index: 'alertstats', sort: true, 'policy', index: 'policy', sorted: true, type type: 'text', align: 'left', resizable: true}, {name: Align: 'left', resizable: true}, {name: 'alert code', index: 'alertcode', sortable: true, align: 'left', resizable: true}, {name: 'message', index: 'Message', sort: right, align: 'left', resizable: true}, {name: 'class', index: 'class', sortab [5, 10, 20, 50, 100], scroll: right: align: 'left', resizable: true}], pager: $ ("#pager"), line number: 10, line list: Sort Name: 'Policy', Sort: 'AC', Autowthood: True, Viewer: True, IMGpath: '/ Script / Theme / Coffee / Images', Caption: 'Notbo System Alert'}); });   

And my work is:

  public functioning DynamicGridData (string sidx, string sound, int page, int rows) {var reference = new alertmount datacontact () ; Int page index = convert.ToInt32 (page) - 1; Int pages = rows; Int totalRecords = reference Altates.count (); Int totalPages = (int) Math.Ciling ((float) total vacancies / (float) page size); IQueryable & LT; Warning & gt; Alert = null; {Alerts = reference Try the Atlars Drop Orders (SDX + + +); (Page Index * Pages) Take Leaving (pageSize); } Grip (parsing east) {Response. Wyeth (ex. + Pre-message); } Var jsonData = new {total = totalPages, page = page, record = totalrecords, rows = (Alert in the alert by reference. New {id = alert.AlertId, cell = new string]] {alert.Policy.Name .toString (), cautious.policyrelli.tostring (), alerts.lertstats.state.tostring (), alert code.tostring (), alert message.tostring (), alert category.name.tostring ()}} ). ToArray ()}; Jason (JSSadata) returned; }   

The exact error message I received during debug is:

A first chance of type 'System.Linq.Dynamic.ParseException' was an exception. Dynamic DLL Microsoft JScript Compilation Error: Expected ')'

And the brake is highlighting a jquery.jqgrid.js command which is:

  AddJSONData (Eval ("(+ + JSON.responsetext +") "), TSGrid.BDV)   

Needless to say that I have gone through many instances but I have Special characters are data that seems to be the problem and it is not being handled, I appreciate any help / advice.

given System.Linq.Dynamic.ParseException It looks like bug in your code # in the alert in the calculation of those Try to see the results - and, in particular, the result of .oAray () debug, I suspect that this is a JavaScript problem.

Comments