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
295
XamGrid Field : AllowEdit=False. Suppress dialog box when pressing delete key on the field cell.
posted

I have a xamgrid field, where i set AllowEdit = False in the field settings. This has the desired effect, and users cannot delete/edit the content of the cell. However when the delete key is pressed a dialog box is shown asking "The '<Cell Name>' cell is readonly. Continue with the remaining cells?. I dont want this dialog box to appear. How can i suppress this dialog box?

 

Attached is an image showing the dialog box when i clicked delete on the cell.

 

Any help is appreciated.

Thanks

Shahin

Parents
No Data
Reply
  • 28407
    posted

    HI Shahin,

     Wire up the XamDataGrid's and check for the ClearCellContents command and cancel it.

      Here a code snippet:

     

    private void xgrid1_ExecutingCommand(object sender, Infragistics.Windows.Controls.Events.ExecutingCommandEventArgs e)

            {

     

    if (e.Command.Name == "ClearCellContents")

                    e.Cancel = true;

            }

Children