How-to: Calculate a cell after a value is filled

3 replies. Last post: March 22, 2010 10:41 PM by Glenn Layaar
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Ben DenisonMember

I am trying use this example to get an Excel like ability for a grid. The code calculates correctly, and there are no errors. However the grid cell does not update? is there something I am missing?

 

 

function WebGridDetail_OnExitEditMode(controlId, tblName, editObject) { var grd = ISGetObject(controlId); var cell = wgGetCellByElement(editObject.cellElement); var colName = cell.Name; if (colName == "DirectHours") { var row = cell.Row; var stdhours = parseFloat(row.GetCells().GetNamedItem("StandardHours").Text); var dirhours = parseFloat(editObject.element.value); if (stdhours == 0) {

result = 0;

}

else {

result = dirhours/stdhours * 100;

}

row.GetCells().GetNamedItem(
"DirectPct").SetText(String(result), true);  
All times are GMT -5. The time now is 11:23 PM.
Previous Next