Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Scott on Sep 29, 2009 18:44
open dhtmlx forum
Setting the value of a cell

Hi guys,

Barcode inventory system, so you scan the barcode and it adds the row if it doesn't exist, if it does exist it just increments the quantity. For the life of me though I can't figure out how to update the Cell value, there's no documentation on the dhtmlXGridCellObject

function addRow(barcode){

    if (mygrid.doesRowExist(barcode)){
        //increment the value

        cell=mygrid.cellByIndex(mygrid.getRowIndex(barcode),3); //qty is the 4th column
//cell.value=cell.value+1;
        //mygrid.setUserData(1,'Qty',cell.value+1);
    } else {
//create a new row
     mygrid.addRow(barcode,[0,barcode,\"Loading...\",0,0,0],mygrid.getRowsNum());        
    }
}
Answer posted by dhxSupport on Sep 30, 2009 03:22