Hello.
I have this issue: I have grid. When I try to add new record by EditForm I need to catch keydown. If Enter was pressed - save record, if Esc - Cancel.
if
(e.keyCode == 13) {
var
masterTable = $find(
"<%= grd.ClientID %>"
).get_masterTableView();
masterTable.fireCommand(
"PerformInsert"
,
""
);
}
if
(e.keyCode == 27) {
var
masterTable = $find(
"<%= grd.ClientID %>"
).get_masterTableView();
masterTable.fireCommand(
"Cancel"
,
""
);
}
All that relates to saving is OK: I call fireCommand("PreformInsert", "") from javascript, in code behind grd_ItemCommand function gets command.
But when I press Esc grd_ItemCommand doesn't get command (but postback fires).
Could you help me by any advice?