javascript - JQGrid editing selection and saving -


I have a JQGrid whose custom setup is saving the frame editing and row data changes, but I'm a bit confused . Data from my selection is not displayed in my post, and I can select the second row while editing a row that changes the value of the current selected row and adds a bug in the editing process.

  $ .ajax ({type: 'post', url: '/ meserver / mircease / gate madata', content type: 'app / jason; charset = utf-8', data type : 'Jason', Data: Parameters}). (Function (data) {clearNotSatisifiedConcessionList (); var rowID; var response = data d; if (response.length & gt; 0) {$ ('p.infotext') .HTML ('& lt; span class = "ui - icon ui-icon-info "& gt; & lt; / span & gt; & lt; strong & gt; Notification: & lt; / strong & gt; Click on one line, then & lt; b & gt; & Lt; i & gt; Edit & lt; / i & gt; & lt; / b & gt;); var lastsel2; var grid = $ ("# myList"). JqGrid ({Data Type: "Local" , Data: response, height: '100%', autowidth: true, hidegrid: false, ajax selection options: {type: post '", content type:' application / jason; charset = utf-8 ', data type:' Jason '), Cole Name: ['id', 'date', 'call1', 'colo2', 'col3'], colomodel: [{name: 'id', index: 'id', wid, th: 20}, { Name: 'date', index: 'date', width: 30, sorttype: 'date', formatter: 'date', formatoptions: {srcformat: 'd / m / y', newform: 'D' / m / y '}, Datefmt:' d / m / y '}, {name:' col1 ', index:' col1 ', width: 20}, {name:' col2 ', index:' col2 'width: 25, type type 'Date', sort order: 'int'}, {name: 'col3', index: 'col3', width: 35, sorttype: 'int'}], pager: '#mypager', rowNum: 15, 'De', audience: true, gridview: true, '' '' '' '' '' '' '' '' '' 'caption:' '}); } Else {clearList (); $ ('P.infotext'). Html ('& lt; span class = "ui-icon ui-icon-info" & gt; & lt; / span & gt; & lt; strong & gt; Notification: & lt; / strong & gt; No data met') ; }}) Error. (Function (jqxhr, textstatus, error thrason) {errorHandler (error filling, 'list', 'load list');});   

Select this is my list above my list and cancel tasks

  $ ("# editRow"). Click (function (event) {event.preventDefault (selected row === blank) {Warning ('no line is selected!') And {$ ("(No row is selected!") $ ( "Edit"); $ ("Edit Button"). Hide (); $ ("SaveButton"). Show (); $ ("Cancel Button"). Show ();}}) ; $ ("# SaveRow") click (function (event) {event.preventDefault (); var selected = = ('# myList'). JqGrid ('getGridParam', 'serro'); var coincessionId = $ (" $ (". My account"); $ ("# myList"). JqGrid ('saveRow', coincationId); $ ("saveButton") Hide (); $ (".button Cancel") Hide () ; $ ("Edit" Click "button"). Show ();}); $ ("Cancel"). Click (function (Event) {event.preventDefault (); var selected = = $ ('# myList'). JqGrid ('getGridParam ',' Serro '); $ ("# myList") .jqGrid (' restoreRow ', selected row), $ ("saving button"). ($. "Cancel button").   Has anyone done this with any solution that I have not received any response as a traveler on the internet, do not hesitate to ask any questions or comments, but please keep this code in mind. Car of nature of application Many edits, which will appear in this list.  

I've added the handler that the edit is aligned to a window variable and it Variable is checked upon cancellation and make sure the currently selected row is the row that was originally selected, it seems that it works, but A loose job is around.

Comments