Hi,
I want to disble the esc key on xamgrid, how can i do this?
I have editing settings on my grid. when I add new row to xamgrid, it will add and it will apply edit settings on newly created row. Now while in edit mode if i press esc key the row is losing its edit template. I did e.handled=true also but no use. Please suggest any work around
Its working, Thank you so much :)
I am not 100% sure what you are trying to achieve, but from what I am assuming (correct me if I am wrong) I think you could use the following approach:
Hook up to the CellExitingEditMode event of the XamGrid and in the event handler use EditingCanceled to determine if editing was canceled (that would mean ESC was pressed) and cancel the event accordingly:
<ig:XamGrid CellExitingEditMode="TestXamGrid_CellExitingEditMode"/>
private void TestXamGrid_CellExitingEditMode(object sender, ExitEditingCellEventArgs e){
e.Cancel = e.EditingCanceled;
}
HTH,