Author Topic: C#, ASP.NET 4, WebFrom, Gridview  (Read 3387 times)

54696d20

  • Newbie
  • *
  • Posts: 7
    • View Profile
C#, ASP.NET 4, WebFrom, Gridview
« on: November 01, 2016, 08:56:30 pm »
Do you know where I can find instructions on setting this up on a webforms project, not MVC? I have the pro version and It's not working at the moment.

54696d20

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: C#, ASP.NET 4, WebFrom, Gridview
« Reply #1 on: November 02, 2016, 01:32:10 am »
At this point I'm returning
Object
  d:Array[858]
    [0 … 99]
      0:Object
        Index: 1
        IsApproved:"True"
        Name: "[email protected]"
        __type:"TestingSearchGrid+People"
        __proto__:Object
      1:Object
        Index: 2
        IsApproved:"True"
        Name: "[email protected]"
        __type: "TestingSearchGrid+People"
        __proto__:Object
I have over 800 users. I have more fields; however, just testing a few at the moment.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: C#, ASP.NET 4, WebFrom, Gridview
« Reply #2 on: November 02, 2016, 10:56:56 pm »
If this is the format of response, then this callback would help to get data for grid.

dataModel.getData = function( response ){
  return { data: response.d };
}

54696d20

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: C#, ASP.NET 4, WebFrom, Gridview
« Reply #3 on: November 03, 2016, 12:48:23 am »
Yeap, thats kind of how I got the free version working.
$grid.pqGrid("hideLoading");
$grid.pqGrid("option", "dataModel.data", response.d);
$grid.pqGrid("refreshDataAndView");

On the free version I get errors if I try to filter all fields. if I change it to filter the email, it works. all fields gives me this error

TestingSearchGrid.aspx:72
Uncaught TypeError: val.toUpperCase is not a function(…)
filterRender @ TestingSearchGrid.aspx:72
b.renderCell @ pqgrid.min.js:74
b._generateRow @ pqgrid.min.js:78
b._generateTables @ pqgrid.min.js:70
b.generateView @ pqgrid.min.js:59
p.refresh @ pqgrid.min.js:282
b.refresh @ pqgrid.min.js:141
b.refreshView @ pqgrid.min.js:142
c._onDataAvailable @ pqgrid.min.js:314
c.filter @ pqgrid.min.js:310
(anonymous function) @ jquery-ui.min.js:6
each @ jquery.min.js:3
each @ jquery.min.js:3
e.fn.(anonymous function) @ jquery-ui.min.js:6
filterhandler @ TestingSearchGrid.aspx:61
(anonymous function) @ pqgrid.min.js:345
dispatch @ jquery.min.js:3
v.handle @ jquery.min.js:3

But I was trying to get the pro version to work.. No love. Those errors I'm getting

pqgrid.min.js:138 Uncaught Error : SyntaxError: Unexpected token < in JSON at position 4
error @ pqgrid.min.js:138
c @ jquery.min.js:3
fireWith @ jquery.min.js:3
k @ jquery.min.js:5
r @ jquery.min.js:5

Thanks