Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
140
How to disable esc key on XamGrid?
posted

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

 

Parents
  • 5595
    Suggested Answer
    posted

    Hi,

    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,

     

Reply Children
No Data