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
110
UltraGrid Copy/Cut/Paste
posted

Hi

use the UltraGrid in the process, if you set a column can not be edited, making the entire line of copy and paste the following tips when the box pops up:

"Error performing Paste operation.Further information:'Cloumn3'cell is read-only.Continue with the remaining cells?"

Q: There are other ways shield the tips? Copy the entire line or shield.

 

this.ultraGrid1.DisplayLayout.Bands[0].Columns["Column 3"].CellActivation = Activation.NoEdit;

 this.ultraGrid1.DisplayLayout.Bands[0].Columns["Column 4"].CellActivation = Activation.NoEdit;

 this.ultraGrid1.PerformAction(UltraGridAction.Cut);/ this.ultraGrid1.PerformAction(UltraGridAction.Copy);

this.ultraGrid1.PerformAction(UltraGridAction.Paste);

Thanks.

Parents
No Data
Reply
  • 69832
    Suggested Answer
    Offline posted

    You can prevent the prompt from appearing by handling the control's Error event and setting the Cancel property of the event arguments to true. Note that the Error event fires for reasons other than a multi-cell paste error, so you should check the return from the MultiCellOperationErrorInfo property (to make sure is is not null) to determine whether this was the reason the event fired.

Children