Ticket Q494853
Visible to All Users

WPF Grid Control - Move to Next Row and Multi-cell paste

created 12 years ago

Hi

We have started using DevExpress controls recently moving from SyncFusion. I have a couple of questions around functionality that was available (or very easy to find) in Grid Control:

  1. I can't seem to find a way to move control to next row. When a user finish editing a cell and hit Enter. I want the control to stay in the same column but move to the next row. This was straight forward in SyncFusion.
  2. There isn't a default way of handling multi-cell paste. I am looking to copy a set of cells from Excel and paste in a column but it only paste in first cell. How can I achieve that in a clean-way without handling KeyDown events which sort of breaks our MVVM design. Or at least a clean, MVVM friendly way of handling this situation.
    Thanks.

Answers approved by DevExpress Support

created 12 years ago (modified 12 years ago)

Hello,

  1. To move the control to the next row, you can handle the DataViewBase.PreviewKeyDown event in the following manner:
C#
private void TableView_PreviewKeyDown_1(object sender, KeyEventArgs e) { if(e.Key == System.Windows.Input.Key.Return) { (sender as TableView).CloseEditor(); (sender as TableView).MoveNextRow(); e.Handled = true; } }
  1. To paste multi cell values, use the DataViewBase.PastingFromClipboard event to handle the paste operation as required:
    Please try this solution and let us know the results.
    Thanks,
    Andrew

    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.