cotoarba bogdan
cotoarba bogdan

Reputation: 23

How tot take the data from a cell that is not editable in jqGrid?

I'm using jqGrid and I need to post a value from a cell that is not editable when I do inline editing.

I tried using:

 editData: {
   proiect: jQuery("#Id").getCell(jQuery("#Id").getGridParam('selrow'), 'ColName') 
}

Upvotes: 0

Views: 349

Answers (1)

Oleg
Oleg

Reputation: 222017

I am not sure that I understand you correct. In any way editData is the property which can be used in case of form editing (see the documentation). If you need to send some additional information to the server extraparam or serializeRowData. The exact implementation depend on the way in which you use inline editing. For example if you call editRow directly inside of onSelectRow then you can do the following

onSelectRow: function (id) {
    var $this = $(this),
        cellValue = $this.jqGrid("getCell", id, 'ColName');

    if (id && id!==lastSel){ 
        $this.jqGrid("restoreRow", lastSel); 
        lastSel = id; 
    }

    $this.jqGrid("editRow", id, {
        keys: true,
        extraparam: {
            proiect: cellValue
        }
    });
}

Upvotes: 1

Related Questions