JScipt with Grid, OnBlur

Everything works here except the eworkGetCurrentCol. This always returns -1 for each and every column. So the "if" had to be removed. But the eworkGetCurrentRow, the getField and the eworkSetCell all work. Things would be fine and I could set the UserName (key field) on exit of every cell in the grid. However, when the user exits from a date column, all of the cells in the grid become read only and there is an "Unspecified error" when trying to submit. I would be happy to fix the exit from date column or else fix the eworkGetCurrentCol. It wouldn't really be necessary to fix both.

 

Thanx!!!!

 

 

var Row, Col, User;

Col = eworkGetCurrentCol("Grid1");
alert(Col.toString());

//If (Col == 1)
//{
    Row = eworkGetCurrentRow("Grid1");
alert(Row.toString());
    User = getField("UserName","");
//    alert (User);
    eworkSetCell("Grid1", 0, Row, User);
//}

Tagged: