Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sstoringimple value function (I think)

Status
Not open for further replies.

simon551

IS-IT--Management
May 4, 2005
249
Hi. I'm trying to use a Nitobi open source javascript library and I'm stuck.
This function works to return one value when a user clicks on a cell:
Code:
function getSelectedValue(GridID)
{
  var myGridObj = $(GridID).jsObject;
  var myRow = myGridObj.getSelectedRow();
  var myColumn = 2;
  var CellValue = myGridObj.getCellObject(myRow,myColumn).getValue();
  alert(CellValue);
}
seems to me I could just total up the CellValues to come up with a total like so:
var CellValue += myGridObj.getCellObject(myRow,myColumn).getValue();
but that doesn't work. Any thoughts?
 
Hi

Maybe the getValue() method returns string while you are expecting number ?
Code:
var CellValue += [red]parseFloat([/red]myGridObj.getCellObject(myRow,myColumn).getValue()[red])[/red];

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top