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>
I'm facing the same problem. Is this bug fixed? I would like to buy this when this one is fixed.