Hello,
How to access the save button to InlineFormTemplate (MCV Grid) in order to
disable it, in case I doubleclick on
row. This allows me to visualize the data of the fields without modification,
or there is another solution to see these data in template form without
saving.
and thank you.
@(Html.EJ().Grid<object>("Editing")
. . .
.ClientSideEvents(eve => { eve.ActionComplete("complete"); })
)
function complete(args) {
if ((args.requestType == "beginedit" || args.requestType == "add")) {
//Disable the save button from the inline form template
$("#InlineEditForm_" + this._id + "_Save").addClass("e-disable");
//If you want to remove the save button from the inline form template
$("#InlineEditForm_" + this._id + "_Save").remove();
}
} |
Thank you for your assistance,
Another thing I want to know is how to know that the event beginedit is triggered by RecordDoubleClick Event
if ((args.requestType == "beginedit" || args.requestType == "add")) {
@(Html.EJ().Grid<object>("Editing")
. . .
.ClientSideEvents(eve => { eve.ActionComplete(“complete”).RecordDoubleClick("onRecordDblClick"); })
)
var isRecordDblClick = false;
function complete(args) {
if ((args.requestType == "beginedit" && isRecordDblClick) || args.requestType == "add") {
isRecordDblClick = false;
. . .
}
}
function onRecordDblClick (args) {
isRecordDblClick = true;
} |
It works.
I used "e-hide" instead of "e-disable".
Thank you very much for your help & assistance.