Author Topic: editCell Method problem  (Read 2254 times)

francis6425

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 12
    • View Profile
editCell Method problem
« on: April 27, 2017, 10:16:43 pm »
Hi,

I've a datagrid with multiple columns like barcode, productid, description, pkg, remarks, qty and price.
description and packaging column is non editable.
After entering data in barcode or productid, I want to to update the value of description, pkg, remarks & price according to values found from an array of objects which match the specific barcode or product id.
I've no problem in updating the values of the fields and then refreshing the row using the below code from the cellSave event.

        ui.rowData['description'] = row.description;
        ui.rowData['remarks'] = row.remarks;
        ui.rowData['pkg'] = row.pkg;
        ui.rowData['price'] = row.price;
        ui.rowData['qty'] = 1;
        grid.pqGrid("refreshRow", {rowIndx: ui.rowIndx});
        grid.pqGrid("editCell", {rowIndx: ui.rowIndx, dataIndx: "qty"});

With the last line above, I wanted it to jump directly to the qty column and open the editor after that.
However it always jump to the column after qty.
I think it is due to the onSave options for editModel having values of "nextFocus" or "nextEdit".
How can I cancel the keyboard event to move to the next column and go to the qty column instead after updating only in the barcode or productid column.

 Please advise.

Regards,
Francis