Ticket T597524
Visible to All Users

Paste Special option in right click menustrip

created 7 years ago (modified 7 years ago)

Hi,

It would be great If possible to show the Paste Special option in the cell right click options.

I am having this option in the toolbars.

Please provide the code snippet to manually popup by using shortcuts.

Comments (1)
RK RK
Rajasekaran Kaliyamoorthy 7 years ago

    Also Please give us the code snippet to manually popup paste special by shortcuts/code

    Answers approved by DevExpress Support

    created 7 years ago (modified 7 years ago)

    Hello Rajasekaran,
    We provide the PasteSpecialCommand command, which allows you to invoke the Paste Special dialog. To open the dialog programmatically, invoke this command as follows:

    C#
    PasteSpecialCommand cmd = new PasteSpecialCommand(spreadsheetControl1); cmd.Execute();

    If you want to add the "Paste Special" item to the context menu, handle the SpreadsheetControl.PopupMenuShowing event as shown below:

    C#
    private void SpreadsheetControl1_PopupMenuShowing(object sender, DevExpress.XtraSpreadsheet.PopupMenuShowingEventArgs e) { PasteSpecialCommand cmd = new PasteSpecialCommand(spreadsheetControl1); SpreadsheetMenuItemCommandWinAdapter menuItemCommandAdapter = new SpreadsheetMenuItemCommandWinAdapter(cmd); SpreadsheetMenuItem menuItem = (SpreadsheetMenuItem)menuItemCommandAdapter.CreateMenuItem(DevExpress.Utils.Menu.DXMenuItemPriority.Normal); menuItem.BeginGroup = true; e.Menu.Items.Add(menuItem); }

    You may also use the CTRL+ALT+V shortcut to invoke the Paste Special dialog.
    I hope that you find this information helpful.

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.