hi guys,
i have a grid with a dataprocessor in which the updateMode set to off (suppInvoiceDP.setUpdateMode(“off”)
I have attached an onEditCell event to the grid, which allows me to select each cell value as the user tabs through it. This works fine. Because the updateMode is set to off, I need to call sendData anytime that the user changes a value. If the user doesn’t change values the select code works fine, but if they change a value, the sendData() is called (which is fine) but then the code doesn’t seem to select the next cell on tab. When I debug it looks like after a change in one cell the next cell also calls a stage=2 (but it doesn’t if the previous cell isn’t changed?). Any ideas??.. code below.
suppInvoiceGrid.attachEvent("onEditCell",function(stage,rowId,cellIndex,nValue,oValue)
{
if (stage==1)
{
if (suppInvoiceGrid.getColType(cellIndex)=="ed" || suppInvoiceGrid.getColType(cellIndex)=="dhxCalendarA" ||suppInvoiceGrid.getColType(cellIndex)=="edn")
{
this.cell.firstChild.select();
}
return true;
}
else if (stage==2)
{
if (cellIndex > 1 && cellIndex < 8)
{
updateInvoiceValues(rowId);
}
if (nValue!=oValue)
{
window.setTimeout(function()
{
suppInvoiceDP.sendData();
},2);
suppInvoiceGrid.selectCell(suppInvoiceGrid.getRowIndex(rowId),cellIndex);
return true;
}
return true;
}
})