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
1360
Paste Error dialog box when pasting over disabled cells
posted

Is there a way to suppress the "paste error" dialog box when pasting cell's over disabled cells.

I would like to ignore those cells without having to press OK for each disabled cell this dialog pops up for...

 

This is the dialog's output:

---------------------------
Paste Error
---------------------------
Error performing Paste operation. Further information: '' cell is read-only.

       

Continue with the remaining cells?
---------------------------
OK   Cancel  
---------------------------

  • 469350
    Verified Answer
    Offline posted

    You can handle the Error event of the grid and do something like this:


            private void ultraGrid1_Error(object sender, Infragistics.Win.UltraWinGrid.ErrorEventArgs e)
            {
                switch (e.ErrorType)
                {
                    case ErrorType.MultiCellOperation:
                        if (e.MultiCellOperationErrorInfo.Operation == MultiCellOperation.Paste)
                        {
                            // Cancel the prompt
                            e.Cancel = true;

                            // Continue
                            e.MultiCellOperationErrorInfo.Action = MultiCellOperationErrorInfo.ErrorAction.Continue;
                        }

                        break;
                }
            }