-
August 10th, 2012, 03:01 PM
#1
calculate cells
Hi ,
i need to calculate the sum of some cells
to do that i use the code
var itemsArray = stocksGrid.extractItemList();
var sumCell = new Number(0);
for (var i in itemsArray) {
var c = stocksGrid.getValue(itemsArray[i],"o_Bid");
if (c==null) c=0;
var val = new Number(c).toFixed(4);
sumCell += Number(val);
}
for the cells that are feed data from server works fine
the problem is when i have cells with custom-data
like
var calc1 = A*B;
info.setCellValue("#Cell01",calc1.toFixed(4));
var itemsArray = stocksGrid.extractItemList();
var sumCell = new Number(0);
for (var i in itemsArray) {
var c = stocksGrid.getValue(itemsArray[i],"#Cell01");
if (c==null) c=0;
var val = new Number(c).toFixed(4);
sumCell += Number(val);
}
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 02:58 PM.
Bookmarks