0

In my jqgrid I'm setting some values for textboxes using setCell Method. But when I set them, I lose the textbox formatter. How can I keep the textbox as it is and replace just the value

$("#acc_jqgrid").jqGrid('setCell', sel_id, 'jqgrid_accDescription', 
                                        newDeviceDescription, '', '', '');

Here's how my colModel is set. I read the jqgrid documentation and found out that Do not use this method when you editing the row or cell. This will set content and and overwrite the input elements. is there anyway I can achieve this. Because i want to keep this editable.

{ name: 'Desc', width: 50, sortable: false, edittype: 'text', editable: true }

Before setCell

enter image description here

After setCell

enter image description here

Nipuna
  • 6,846
  • 9
  • 64
  • 87
  • Could you describe more exactly the situation where you try to change the value of the cell? Do you use some custom formatter or you use some editing mode? Which one editing mode you use (inline editing, form editing or cell editing)? From where you try to do the changes (from some other jqGrid handler or from outside)? – Oleg Jan 23 '12 at 12:55

1 Answers1

0

In the old answer you will find the demo which demonstrate one way how the editing cells can be modified. Just click on any cell of the 'Amount' or 'Tax' column and change the number. You will see that the value in the summary row will be also changed.

The demo read the data from the cell. In the same way you can set the cell content.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798