Sigma Php Ajax framework, Ajax Components, GUI Builder
May 23, 2012, 02:35:58 AM *
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: Known Bug - Aggregate Problems  (Read 1851 times)
steven
Moderator
Hero Member
*****
Posts: 544



View Profile
« on: March 03, 2008, 12:50:22 AM »

I am having problems getting the "sum" aggregate to work.  In my test program, my data has three rows, with the values 3, 1, and 2 in column "col2".  I specify the sum aggregate, but instead of getting the number 6, I get 312.  Any ideas as to what is happening?

<script>
var grid = null;
window.onload = function(){
   var context = {
      sequence:true,checkBox:false,readonly:false,locked:0,sortable:false,paintMode:"all",
      aggregate:[{col:"col2",exp:"sum",format:"#"}]
   };
   var columns = [     
      {name:"regid",caption:"regid",mode:"string",sortable:true},
      {name:"personid",caption:"personid",mode:"string",sortable:true},
      {name:"contactfirstname",caption:"contactfirstname",mode:"string",sortable:true},
      {name:"col0",caption:"First Name",mode:"string",sortable:true},
      {name:"col1",caption:"Last Name",mode:"string",sortable:true},
      {name:"col2",caption:"col2",width:60,mode:"number",format:"#"}
   ];
   grid = new SigmaGrid("gridbox",context,columns);
   grid.bindData([]);
   
}
var request = null;
function loadFromFile(){
   if(request ==null)
      request = new SigmaRequest();
   request.open("get","jhb2.xml",true);
   request.onresult = function(){
      var doc = request.getXMLDoc();
      grid.bindXML(doc,"employee");
   }
   request.send();
}

</script>
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
steven
Moderator
Hero Member
*****
Posts: 544



View Profile
« Reply #1 on: March 03, 2008, 12:52:42 AM »

Please replace /js/sigmagrid.js with the one attached for urgent use.
It will be fixed in version 2.0

« Last Edit: March 03, 2008, 01:41:15 AM by steven » 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!