Get New Value of a Cell on Edit to use as variable

I am trying to get the value of a cell after it has been edited to use as part of a select statement to populate a combo box.

I’m am trying to use the code below can I please have some assistance with setting it up correctly.

timesheetGrid.attachEvent("onEditCell",function(2,rID,4,nValue,oValue){
	var ProjectID = nValue;
	JoineryItems.load("data/combo/JoineryItems.php?Project="+ProjectID);
});

Most probably, the code need to be changed like next

timesheetGrid.attachEvent("onEditCell",function(stage,rID,column,nValue,oValue){
   if(stage == 2 && column == 4){
     var ProjectID = nValue;
     JoineryItems.load("data/combo/JoineryItems.php?Project="+ProjectID);
  }
});