Sigma Php Ajax framework, Ajax Components, GUI Builder
September 09, 2010, 07:16:51 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: JSON Call in SigmaGrid 2.0  (Read 1502 times)
bshafs
Newbie
*
Posts: 1


View Profile
« on: July 07, 2008, 09:39:55 PM »

I have been trying to bind a grid using the example-paging.html document which came with the 2.0 package.
So far, after the line return ResponseT is executed, nothing happens and the grid remains blank.  There is no error message thrown.

I am using a SigmaRequest() object to retrieve JSON code from another page.  FireBug has confirmed the JSON is in the proper format.  I have also executed the .slice() method to verify it parses the JSON correctly.

Here is my code



Objects MyDsOption and myColsOption are modifications from the original dsOption and colsOption which were trimmed down to match the number of columns in my datam which is five.

If anyone can help me I would appreciate it so much. I have spent several hours and have gotten nowhere.  I am at a dead end. 

Thank you.
Logged
steven
Moderator
Hero Member
*****
Posts: 541



View Profile
« Reply #1 on: July 08, 2008, 07:52:36 PM »

I think you are talking about paginal outpout on client. You need to do a quest synchronously.  The following code snippet may give you some ideas.

function getEmployeeData(grid) {
  var responseT={};
  var req = (window.XMLHttpRequest)?new XMLHttpRequest()Sad(window.ActiveXObject)?new ActiveXObject("Microsoft.XMLHTTP"):false);
  if(req){
    var pageInfo = grid.getPageInfo();
    req.open("GET", "Controller.php?pageNum=" + pageInfo.pageNum, false);//the third param must be false
    req.send(null);
    var json=eval(req.responseText);
    ...
}

}
Logged

Sigma AJAX Data Grid - Easy to Integrate with PHP, ASP Classic, ASP.NET & Java
Sigma PHP Ajax Framework - WYSIWYG GUI Builder With Tree, Grid, Treegrid, Dialog, Tab & More Component
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!