How to trigger beforeSubmitCell event inside ondblClickRow event












0















I've a question related to jqgrid v4.15.4. I have used beforeSubmitCell event to return new array that will be posted to the server. Also I've kept options cellEdit: true , cellsubmit: 'remote'.
By default, if a jqGrid cell is editable, single click on that cell changes it to edit mode.Which I know can be done with ondblClickRow. But how can I call beforeSubmitCell event inside ondblClickRow event function.



for references, I've read : jQGrid Cell Editing on double click of row



Let me know if more info required?










share|improve this question























  • Did you read my answer? I didn't get any feedback on my answer during 20 days.

    – Oleg
    Jan 22 at 19:32











  • Hello Oleg, Sorry for the delay response, I have initially checked your suggestion but wanted to test more with different cell type(text, dropdown, date), so not able to share my views. But Now I did in below answer. Please check.

    – Chandan
    Mar 4 at 11:54











  • Sorry, but I don't understand what you mean with "But Now I did in below answer. Please check." Where you posted some additional information? Typically you should click "edit" link below the text of you question to edit the text. You can append the text with "UPDATED: ..." and then post new comment to inform me about changes in the text.

    – Oleg
    Mar 4 at 11:59
















0















I've a question related to jqgrid v4.15.4. I have used beforeSubmitCell event to return new array that will be posted to the server. Also I've kept options cellEdit: true , cellsubmit: 'remote'.
By default, if a jqGrid cell is editable, single click on that cell changes it to edit mode.Which I know can be done with ondblClickRow. But how can I call beforeSubmitCell event inside ondblClickRow event function.



for references, I've read : jQGrid Cell Editing on double click of row



Let me know if more info required?










share|improve this question























  • Did you read my answer? I didn't get any feedback on my answer during 20 days.

    – Oleg
    Jan 22 at 19:32











  • Hello Oleg, Sorry for the delay response, I have initially checked your suggestion but wanted to test more with different cell type(text, dropdown, date), so not able to share my views. But Now I did in below answer. Please check.

    – Chandan
    Mar 4 at 11:54











  • Sorry, but I don't understand what you mean with "But Now I did in below answer. Please check." Where you posted some additional information? Typically you should click "edit" link below the text of you question to edit the text. You can append the text with "UPDATED: ..." and then post new comment to inform me about changes in the text.

    – Oleg
    Mar 4 at 11:59














0












0








0








I've a question related to jqgrid v4.15.4. I have used beforeSubmitCell event to return new array that will be posted to the server. Also I've kept options cellEdit: true , cellsubmit: 'remote'.
By default, if a jqGrid cell is editable, single click on that cell changes it to edit mode.Which I know can be done with ondblClickRow. But how can I call beforeSubmitCell event inside ondblClickRow event function.



for references, I've read : jQGrid Cell Editing on double click of row



Let me know if more info required?










share|improve this question














I've a question related to jqgrid v4.15.4. I have used beforeSubmitCell event to return new array that will be posted to the server. Also I've kept options cellEdit: true , cellsubmit: 'remote'.
By default, if a jqGrid cell is editable, single click on that cell changes it to edit mode.Which I know can be done with ondblClickRow. But how can I call beforeSubmitCell event inside ondblClickRow event function.



for references, I've read : jQGrid Cell Editing on double click of row



Let me know if more info required?







asp.net-mvc jqgrid free-jqgrid






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 2 at 14:40









ChandanChandan

3410




3410













  • Did you read my answer? I didn't get any feedback on my answer during 20 days.

    – Oleg
    Jan 22 at 19:32











  • Hello Oleg, Sorry for the delay response, I have initially checked your suggestion but wanted to test more with different cell type(text, dropdown, date), so not able to share my views. But Now I did in below answer. Please check.

    – Chandan
    Mar 4 at 11:54











  • Sorry, but I don't understand what you mean with "But Now I did in below answer. Please check." Where you posted some additional information? Typically you should click "edit" link below the text of you question to edit the text. You can append the text with "UPDATED: ..." and then post new comment to inform me about changes in the text.

    – Oleg
    Mar 4 at 11:59



















  • Did you read my answer? I didn't get any feedback on my answer during 20 days.

    – Oleg
    Jan 22 at 19:32











  • Hello Oleg, Sorry for the delay response, I have initially checked your suggestion but wanted to test more with different cell type(text, dropdown, date), so not able to share my views. But Now I did in below answer. Please check.

    – Chandan
    Mar 4 at 11:54











  • Sorry, but I don't understand what you mean with "But Now I did in below answer. Please check." Where you posted some additional information? Typically you should click "edit" link below the text of you question to edit the text. You can append the text with "UPDATED: ..." and then post new comment to inform me about changes in the text.

    – Oleg
    Mar 4 at 11:59

















Did you read my answer? I didn't get any feedback on my answer during 20 days.

– Oleg
Jan 22 at 19:32





Did you read my answer? I didn't get any feedback on my answer during 20 days.

– Oleg
Jan 22 at 19:32













Hello Oleg, Sorry for the delay response, I have initially checked your suggestion but wanted to test more with different cell type(text, dropdown, date), so not able to share my views. But Now I did in below answer. Please check.

– Chandan
Mar 4 at 11:54





Hello Oleg, Sorry for the delay response, I have initially checked your suggestion but wanted to test more with different cell type(text, dropdown, date), so not able to share my views. But Now I did in below answer. Please check.

– Chandan
Mar 4 at 11:54













Sorry, but I don't understand what you mean with "But Now I did in below answer. Please check." Where you posted some additional information? Typically you should click "edit" link below the text of you question to edit the text. You can append the text with "UPDATED: ..." and then post new comment to inform me about changes in the text.

– Oleg
Mar 4 at 11:59





Sorry, but I don't understand what you mean with "But Now I did in below answer. Please check." Where you posted some additional information? Typically you should click "edit" link below the text of you question to edit the text. You can append the text with "UPDATED: ..." and then post new comment to inform me about changes in the text.

– Oleg
Mar 4 at 11:59












1 Answer
1






active

oldest

votes


















1














If I correctly understand your problem, the you should don't use the option cellEdit: true (but still use cellsubmit: 'remote') and to set cellEdit: true dynamically before calling cell editing methods (editCell, restoreCell, saveCell, prevCell or nextCell). Additionally you will have to duplicate the keyboard operations (see the lines of free jqGrid code). The resulting code could look like the code below:



ondblClickRow: function (rowid, iRow, iCol, e) {
var $self = $(this), p = $self.jqGrid("getGridParam");
p.cellEdit = true;
$self.jqGrid("editCell", iRow, iCol, true);
p.cellEdit = false;
},
afterEditCell: function (rowid, cmName, cellValue, iRow, iCol) {
var getTdByColumnIndex = function (tr, iCol) {
var $t = this, frozenRows = $t.grid.fbRows;

tr = frozenRows != null && frozenRows[0].cells.length > iCol ?
frozenRows[tr.rowIndex] : tr;
return tr != null && tr.cells != null ? $(tr.cells[iCol]) : $();
},
$td = getTdByColumnIndex.call(this, this.rows[iRow], iCol),
$self = $(this),
$t = this,
p = $self.jqGrid("getGridParam");

$("input, select, textarea", $td).on("keydown", function (e) {
if (e.keyCode === 27) { //ESC
p.cellEdit = true;
$self.jqGrid("restoreCell", iRow, iCol);
p.cellEdit = false;
} else if (e.keyCode === 13 && !e.shiftKey) { //Enter
p.cellEdit = true;
$self.jqGrid("saveCell", iRow, iCol);
p.cellEdit = false;
return false;
} else if (e.keyCode === 9) {
if (!$t.grid.hDiv.loading) {
p.cellEdit = true;
if (e.shiftKey) {
$self.jqGrid("prevCell", iRow, iCol); //Shift TAb
} else {
$self.jqGrid("nextCell", iRow, iCol); //Tab
}
p.cellEdit = false;
} else {
return false;
}
}
e.stopPropagation();
});
}


See https://jsfiddle.net/OlegKi/Lm7akxz2/






share|improve this answer
























  • Hi @Oleg, I have implemented the above code as you suggested and it worked fine with one issue which comes when the debugger(F10) pass the line $self.jqGrid("saveCell", iRow, iCol); . It says URL not set. What could be the possible reason for this?

    – Chandan
    Mar 4 at 11:37











  • @Chandan: You don't posted the code which you use. Thus it's difficult for me to answer on your question. I can only guess. If you use cellsubmit: "remote" then you should specify cellurl to which the modified cell will be posted. Do you specified cellurl?

    – Oleg
    Mar 4 at 11:43






  • 1





    @Chandan: If you use the option cellsubmit: "remote" then you want that jqGrid post the modified data to the server instead of only saving the changes of cell editing locally. Thus you have to specify cellurl always if you use the option cellsubmit: "remote".

    – Oleg
    Mar 4 at 14:11






  • 1





    @Chandan: You can set cellurl value dynamically with the code like var p = $("#list").jqGrid("getGridParam"); p.cellurl= "newUrl";

    – Oleg
    Mar 4 at 16:47






  • 1





    @Chandan: Alternatively you can define cellurl parameter as callback function cellurl: function (currentCellurl, iRow, iCol, rowid, value, name) { return "dynamicUrl"; }. I see that the current code use currentCellurl as the first parameter. I'll remove it in the next version of free jqGrid. The prototype of callback function will be fixed to cellurl: function (iRow, iCol, rowid, value, name) { return "dynamicUrl"; }

    – Oleg
    Mar 4 at 16:54











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54008264%2fhow-to-trigger-beforesubmitcell-event-inside-ondblclickrow-event%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














If I correctly understand your problem, the you should don't use the option cellEdit: true (but still use cellsubmit: 'remote') and to set cellEdit: true dynamically before calling cell editing methods (editCell, restoreCell, saveCell, prevCell or nextCell). Additionally you will have to duplicate the keyboard operations (see the lines of free jqGrid code). The resulting code could look like the code below:



ondblClickRow: function (rowid, iRow, iCol, e) {
var $self = $(this), p = $self.jqGrid("getGridParam");
p.cellEdit = true;
$self.jqGrid("editCell", iRow, iCol, true);
p.cellEdit = false;
},
afterEditCell: function (rowid, cmName, cellValue, iRow, iCol) {
var getTdByColumnIndex = function (tr, iCol) {
var $t = this, frozenRows = $t.grid.fbRows;

tr = frozenRows != null && frozenRows[0].cells.length > iCol ?
frozenRows[tr.rowIndex] : tr;
return tr != null && tr.cells != null ? $(tr.cells[iCol]) : $();
},
$td = getTdByColumnIndex.call(this, this.rows[iRow], iCol),
$self = $(this),
$t = this,
p = $self.jqGrid("getGridParam");

$("input, select, textarea", $td).on("keydown", function (e) {
if (e.keyCode === 27) { //ESC
p.cellEdit = true;
$self.jqGrid("restoreCell", iRow, iCol);
p.cellEdit = false;
} else if (e.keyCode === 13 && !e.shiftKey) { //Enter
p.cellEdit = true;
$self.jqGrid("saveCell", iRow, iCol);
p.cellEdit = false;
return false;
} else if (e.keyCode === 9) {
if (!$t.grid.hDiv.loading) {
p.cellEdit = true;
if (e.shiftKey) {
$self.jqGrid("prevCell", iRow, iCol); //Shift TAb
} else {
$self.jqGrid("nextCell", iRow, iCol); //Tab
}
p.cellEdit = false;
} else {
return false;
}
}
e.stopPropagation();
});
}


See https://jsfiddle.net/OlegKi/Lm7akxz2/






share|improve this answer
























  • Hi @Oleg, I have implemented the above code as you suggested and it worked fine with one issue which comes when the debugger(F10) pass the line $self.jqGrid("saveCell", iRow, iCol); . It says URL not set. What could be the possible reason for this?

    – Chandan
    Mar 4 at 11:37











  • @Chandan: You don't posted the code which you use. Thus it's difficult for me to answer on your question. I can only guess. If you use cellsubmit: "remote" then you should specify cellurl to which the modified cell will be posted. Do you specified cellurl?

    – Oleg
    Mar 4 at 11:43






  • 1





    @Chandan: If you use the option cellsubmit: "remote" then you want that jqGrid post the modified data to the server instead of only saving the changes of cell editing locally. Thus you have to specify cellurl always if you use the option cellsubmit: "remote".

    – Oleg
    Mar 4 at 14:11






  • 1





    @Chandan: You can set cellurl value dynamically with the code like var p = $("#list").jqGrid("getGridParam"); p.cellurl= "newUrl";

    – Oleg
    Mar 4 at 16:47






  • 1





    @Chandan: Alternatively you can define cellurl parameter as callback function cellurl: function (currentCellurl, iRow, iCol, rowid, value, name) { return "dynamicUrl"; }. I see that the current code use currentCellurl as the first parameter. I'll remove it in the next version of free jqGrid. The prototype of callback function will be fixed to cellurl: function (iRow, iCol, rowid, value, name) { return "dynamicUrl"; }

    – Oleg
    Mar 4 at 16:54
















1














If I correctly understand your problem, the you should don't use the option cellEdit: true (but still use cellsubmit: 'remote') and to set cellEdit: true dynamically before calling cell editing methods (editCell, restoreCell, saveCell, prevCell or nextCell). Additionally you will have to duplicate the keyboard operations (see the lines of free jqGrid code). The resulting code could look like the code below:



ondblClickRow: function (rowid, iRow, iCol, e) {
var $self = $(this), p = $self.jqGrid("getGridParam");
p.cellEdit = true;
$self.jqGrid("editCell", iRow, iCol, true);
p.cellEdit = false;
},
afterEditCell: function (rowid, cmName, cellValue, iRow, iCol) {
var getTdByColumnIndex = function (tr, iCol) {
var $t = this, frozenRows = $t.grid.fbRows;

tr = frozenRows != null && frozenRows[0].cells.length > iCol ?
frozenRows[tr.rowIndex] : tr;
return tr != null && tr.cells != null ? $(tr.cells[iCol]) : $();
},
$td = getTdByColumnIndex.call(this, this.rows[iRow], iCol),
$self = $(this),
$t = this,
p = $self.jqGrid("getGridParam");

$("input, select, textarea", $td).on("keydown", function (e) {
if (e.keyCode === 27) { //ESC
p.cellEdit = true;
$self.jqGrid("restoreCell", iRow, iCol);
p.cellEdit = false;
} else if (e.keyCode === 13 && !e.shiftKey) { //Enter
p.cellEdit = true;
$self.jqGrid("saveCell", iRow, iCol);
p.cellEdit = false;
return false;
} else if (e.keyCode === 9) {
if (!$t.grid.hDiv.loading) {
p.cellEdit = true;
if (e.shiftKey) {
$self.jqGrid("prevCell", iRow, iCol); //Shift TAb
} else {
$self.jqGrid("nextCell", iRow, iCol); //Tab
}
p.cellEdit = false;
} else {
return false;
}
}
e.stopPropagation();
});
}


See https://jsfiddle.net/OlegKi/Lm7akxz2/






share|improve this answer
























  • Hi @Oleg, I have implemented the above code as you suggested and it worked fine with one issue which comes when the debugger(F10) pass the line $self.jqGrid("saveCell", iRow, iCol); . It says URL not set. What could be the possible reason for this?

    – Chandan
    Mar 4 at 11:37











  • @Chandan: You don't posted the code which you use. Thus it's difficult for me to answer on your question. I can only guess. If you use cellsubmit: "remote" then you should specify cellurl to which the modified cell will be posted. Do you specified cellurl?

    – Oleg
    Mar 4 at 11:43






  • 1





    @Chandan: If you use the option cellsubmit: "remote" then you want that jqGrid post the modified data to the server instead of only saving the changes of cell editing locally. Thus you have to specify cellurl always if you use the option cellsubmit: "remote".

    – Oleg
    Mar 4 at 14:11






  • 1





    @Chandan: You can set cellurl value dynamically with the code like var p = $("#list").jqGrid("getGridParam"); p.cellurl= "newUrl";

    – Oleg
    Mar 4 at 16:47






  • 1





    @Chandan: Alternatively you can define cellurl parameter as callback function cellurl: function (currentCellurl, iRow, iCol, rowid, value, name) { return "dynamicUrl"; }. I see that the current code use currentCellurl as the first parameter. I'll remove it in the next version of free jqGrid. The prototype of callback function will be fixed to cellurl: function (iRow, iCol, rowid, value, name) { return "dynamicUrl"; }

    – Oleg
    Mar 4 at 16:54














1












1








1







If I correctly understand your problem, the you should don't use the option cellEdit: true (but still use cellsubmit: 'remote') and to set cellEdit: true dynamically before calling cell editing methods (editCell, restoreCell, saveCell, prevCell or nextCell). Additionally you will have to duplicate the keyboard operations (see the lines of free jqGrid code). The resulting code could look like the code below:



ondblClickRow: function (rowid, iRow, iCol, e) {
var $self = $(this), p = $self.jqGrid("getGridParam");
p.cellEdit = true;
$self.jqGrid("editCell", iRow, iCol, true);
p.cellEdit = false;
},
afterEditCell: function (rowid, cmName, cellValue, iRow, iCol) {
var getTdByColumnIndex = function (tr, iCol) {
var $t = this, frozenRows = $t.grid.fbRows;

tr = frozenRows != null && frozenRows[0].cells.length > iCol ?
frozenRows[tr.rowIndex] : tr;
return tr != null && tr.cells != null ? $(tr.cells[iCol]) : $();
},
$td = getTdByColumnIndex.call(this, this.rows[iRow], iCol),
$self = $(this),
$t = this,
p = $self.jqGrid("getGridParam");

$("input, select, textarea", $td).on("keydown", function (e) {
if (e.keyCode === 27) { //ESC
p.cellEdit = true;
$self.jqGrid("restoreCell", iRow, iCol);
p.cellEdit = false;
} else if (e.keyCode === 13 && !e.shiftKey) { //Enter
p.cellEdit = true;
$self.jqGrid("saveCell", iRow, iCol);
p.cellEdit = false;
return false;
} else if (e.keyCode === 9) {
if (!$t.grid.hDiv.loading) {
p.cellEdit = true;
if (e.shiftKey) {
$self.jqGrid("prevCell", iRow, iCol); //Shift TAb
} else {
$self.jqGrid("nextCell", iRow, iCol); //Tab
}
p.cellEdit = false;
} else {
return false;
}
}
e.stopPropagation();
});
}


See https://jsfiddle.net/OlegKi/Lm7akxz2/






share|improve this answer













If I correctly understand your problem, the you should don't use the option cellEdit: true (but still use cellsubmit: 'remote') and to set cellEdit: true dynamically before calling cell editing methods (editCell, restoreCell, saveCell, prevCell or nextCell). Additionally you will have to duplicate the keyboard operations (see the lines of free jqGrid code). The resulting code could look like the code below:



ondblClickRow: function (rowid, iRow, iCol, e) {
var $self = $(this), p = $self.jqGrid("getGridParam");
p.cellEdit = true;
$self.jqGrid("editCell", iRow, iCol, true);
p.cellEdit = false;
},
afterEditCell: function (rowid, cmName, cellValue, iRow, iCol) {
var getTdByColumnIndex = function (tr, iCol) {
var $t = this, frozenRows = $t.grid.fbRows;

tr = frozenRows != null && frozenRows[0].cells.length > iCol ?
frozenRows[tr.rowIndex] : tr;
return tr != null && tr.cells != null ? $(tr.cells[iCol]) : $();
},
$td = getTdByColumnIndex.call(this, this.rows[iRow], iCol),
$self = $(this),
$t = this,
p = $self.jqGrid("getGridParam");

$("input, select, textarea", $td).on("keydown", function (e) {
if (e.keyCode === 27) { //ESC
p.cellEdit = true;
$self.jqGrid("restoreCell", iRow, iCol);
p.cellEdit = false;
} else if (e.keyCode === 13 && !e.shiftKey) { //Enter
p.cellEdit = true;
$self.jqGrid("saveCell", iRow, iCol);
p.cellEdit = false;
return false;
} else if (e.keyCode === 9) {
if (!$t.grid.hDiv.loading) {
p.cellEdit = true;
if (e.shiftKey) {
$self.jqGrid("prevCell", iRow, iCol); //Shift TAb
} else {
$self.jqGrid("nextCell", iRow, iCol); //Tab
}
p.cellEdit = false;
} else {
return false;
}
}
e.stopPropagation();
});
}


See https://jsfiddle.net/OlegKi/Lm7akxz2/







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 2 at 18:10









OlegOleg

211k9306704




211k9306704













  • Hi @Oleg, I have implemented the above code as you suggested and it worked fine with one issue which comes when the debugger(F10) pass the line $self.jqGrid("saveCell", iRow, iCol); . It says URL not set. What could be the possible reason for this?

    – Chandan
    Mar 4 at 11:37











  • @Chandan: You don't posted the code which you use. Thus it's difficult for me to answer on your question. I can only guess. If you use cellsubmit: "remote" then you should specify cellurl to which the modified cell will be posted. Do you specified cellurl?

    – Oleg
    Mar 4 at 11:43






  • 1





    @Chandan: If you use the option cellsubmit: "remote" then you want that jqGrid post the modified data to the server instead of only saving the changes of cell editing locally. Thus you have to specify cellurl always if you use the option cellsubmit: "remote".

    – Oleg
    Mar 4 at 14:11






  • 1





    @Chandan: You can set cellurl value dynamically with the code like var p = $("#list").jqGrid("getGridParam"); p.cellurl= "newUrl";

    – Oleg
    Mar 4 at 16:47






  • 1





    @Chandan: Alternatively you can define cellurl parameter as callback function cellurl: function (currentCellurl, iRow, iCol, rowid, value, name) { return "dynamicUrl"; }. I see that the current code use currentCellurl as the first parameter. I'll remove it in the next version of free jqGrid. The prototype of callback function will be fixed to cellurl: function (iRow, iCol, rowid, value, name) { return "dynamicUrl"; }

    – Oleg
    Mar 4 at 16:54



















  • Hi @Oleg, I have implemented the above code as you suggested and it worked fine with one issue which comes when the debugger(F10) pass the line $self.jqGrid("saveCell", iRow, iCol); . It says URL not set. What could be the possible reason for this?

    – Chandan
    Mar 4 at 11:37











  • @Chandan: You don't posted the code which you use. Thus it's difficult for me to answer on your question. I can only guess. If you use cellsubmit: "remote" then you should specify cellurl to which the modified cell will be posted. Do you specified cellurl?

    – Oleg
    Mar 4 at 11:43






  • 1





    @Chandan: If you use the option cellsubmit: "remote" then you want that jqGrid post the modified data to the server instead of only saving the changes of cell editing locally. Thus you have to specify cellurl always if you use the option cellsubmit: "remote".

    – Oleg
    Mar 4 at 14:11






  • 1





    @Chandan: You can set cellurl value dynamically with the code like var p = $("#list").jqGrid("getGridParam"); p.cellurl= "newUrl";

    – Oleg
    Mar 4 at 16:47






  • 1





    @Chandan: Alternatively you can define cellurl parameter as callback function cellurl: function (currentCellurl, iRow, iCol, rowid, value, name) { return "dynamicUrl"; }. I see that the current code use currentCellurl as the first parameter. I'll remove it in the next version of free jqGrid. The prototype of callback function will be fixed to cellurl: function (iRow, iCol, rowid, value, name) { return "dynamicUrl"; }

    – Oleg
    Mar 4 at 16:54

















Hi @Oleg, I have implemented the above code as you suggested and it worked fine with one issue which comes when the debugger(F10) pass the line $self.jqGrid("saveCell", iRow, iCol); . It says URL not set. What could be the possible reason for this?

– Chandan
Mar 4 at 11:37





Hi @Oleg, I have implemented the above code as you suggested and it worked fine with one issue which comes when the debugger(F10) pass the line $self.jqGrid("saveCell", iRow, iCol); . It says URL not set. What could be the possible reason for this?

– Chandan
Mar 4 at 11:37













@Chandan: You don't posted the code which you use. Thus it's difficult for me to answer on your question. I can only guess. If you use cellsubmit: "remote" then you should specify cellurl to which the modified cell will be posted. Do you specified cellurl?

– Oleg
Mar 4 at 11:43





@Chandan: You don't posted the code which you use. Thus it's difficult for me to answer on your question. I can only guess. If you use cellsubmit: "remote" then you should specify cellurl to which the modified cell will be posted. Do you specified cellurl?

– Oleg
Mar 4 at 11:43




1




1





@Chandan: If you use the option cellsubmit: "remote" then you want that jqGrid post the modified data to the server instead of only saving the changes of cell editing locally. Thus you have to specify cellurl always if you use the option cellsubmit: "remote".

– Oleg
Mar 4 at 14:11





@Chandan: If you use the option cellsubmit: "remote" then you want that jqGrid post the modified data to the server instead of only saving the changes of cell editing locally. Thus you have to specify cellurl always if you use the option cellsubmit: "remote".

– Oleg
Mar 4 at 14:11




1




1





@Chandan: You can set cellurl value dynamically with the code like var p = $("#list").jqGrid("getGridParam"); p.cellurl= "newUrl";

– Oleg
Mar 4 at 16:47





@Chandan: You can set cellurl value dynamically with the code like var p = $("#list").jqGrid("getGridParam"); p.cellurl= "newUrl";

– Oleg
Mar 4 at 16:47




1




1





@Chandan: Alternatively you can define cellurl parameter as callback function cellurl: function (currentCellurl, iRow, iCol, rowid, value, name) { return "dynamicUrl"; }. I see that the current code use currentCellurl as the first parameter. I'll remove it in the next version of free jqGrid. The prototype of callback function will be fixed to cellurl: function (iRow, iCol, rowid, value, name) { return "dynamicUrl"; }

– Oleg
Mar 4 at 16:54





@Chandan: Alternatively you can define cellurl parameter as callback function cellurl: function (currentCellurl, iRow, iCol, rowid, value, name) { return "dynamicUrl"; }. I see that the current code use currentCellurl as the first parameter. I'll remove it in the next version of free jqGrid. The prototype of callback function will be fixed to cellurl: function (iRow, iCol, rowid, value, name) { return "dynamicUrl"; }

– Oleg
Mar 4 at 16:54




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54008264%2fhow-to-trigger-beforesubmitcell-event-inside-ondblclickrow-event%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

SQL update select statement

WPF add header to Image with URL pettitions [duplicate]