Hello
I want to know if can disable “key enter” action on row adding, because I trigger a postback in an event fired after a cell has exited edit mode.
GridViewData.RowUpdating += new RowUpdatingHandler(GridViewData_RowUpdating);
GridViewData.Behaviors.EditingCore.Behaviors.CellEditing.CellEditingClientEvents.ExitedEditMode = "GridViewData_CellEditing_ExitedEditMode";
And in the page aspx I have the follow:
<script type="text/javascript" id="igClientScript">
function GridViewData_RowAdding_ExitedEditMode(webDataGrid, evntArgs) {
var grid = webDataGrid; grid.get_behaviors().get_editingCore().get_behaviors().get_rowAdding()._commitRow();
}
</script>
This is okay, because I need it.
In this case, when I’ve exited of a cell edit mode (pressing any key or changing focus), I get a postback and a commit row, but also, when I press “enter key”, get two postbacks and two commits row, and it’s wrong.
Does any way to prevent “key enter” action in GridViewData_RowUpdating(…) function?
How can I solve this problem? Please, help me!
Thanks.
Geovanny Domínguez.
Hello Geovanny,
Thank you for your reply.
Glad that the issue has been resolved. Please do not hesitate to contact us if you have any further questions regarding this scenario.
Hello Nokolay,
I already understood, I was making this in GridViewData_RowAdding_ExitedEditMode function and not in GridViewData_RowAdding_ExitingEditMode function. You help me a lot. Thank you very much.
Geovanny Domínguez
Hello,
I'm just checking if you have managed to resolve your issue.
Hi Geovanny,
I created a sample with 11.1.1006, but still it is working under IE. I am attaching the sample for your reference. Let me know if it is working on your side.
Hello Nikolay
Thank you for replay. I'm using NetAdvantage v11.1.20111.1006, probably this is cause.