Author Topic: Saving Method  (Read 3377 times)

omerix

  • Pro Enterprise
  • Full Member
  • *
  • Posts: 148
    • View Profile
Saving Method
« on: January 30, 2014, 08:49:37 pm »
Hello Param,

I have a question. My grid works fine. I can save the values on a row when click up or down arrow. But I also want to save the values on a row when user out of the row in progress without click any arrow keys.

Because sometimes user make some changings in a row and then they click any other cell in a different row and make another changing thus first changings in remains unsaved.

Please see below code i use for saving.

Could you please advice how to solve?

Code: [Select]
$grid.on("pqgridcelleditkeydown", function( event, ui ) {
keyCode=event.keyCode;
if (keyCode==40 || keyCode==38) {
update(ui.rowIndx,ui.colIndx);
}
});

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Saving Method
« Reply #1 on: January 30, 2014, 10:03:01 pm »
quitEditMode event takes care of that.

What's the code in your quitEditMode event?

omerix

  • Pro Enterprise
  • Full Member
  • *
  • Posts: 148
    • View Profile
Re: Saving Method
« Reply #2 on: February 14, 2014, 05:35:01 pm »
Hello Param ,

Here is my code in quitEditMode. Sorry for late reply, I was quite bussy.
I have couple of more questions and I am prepareing a video for you to make you understand clearly. I will upload it to a web site and let you check. If needed I will pay for it also.


Code: [Select]
        quitEditMode: function (evt, ui) {
            $grid.pqGrid("saveEditCell");
        },