Spread WPF 17
Spread WPF Documentation / Developer's Guide / Managing the User Interface / Using Drag and Move
In This Topic
    Using Drag and Move
    In This Topic

    The user can use the mouse to select a cell or block of cells and move them to a new location. Move the mouse pointer to the edge of a selected column, row, or block of cells and then click and drag the selected range to the new location.

    The following image displays a selected block of cells with the drag icon:

    Selecting a block of cells in a spreadsheet

    Move the block to the new location.

    Moving the selected block of cells to a new location in the spreadsheet

    Release the mouse to display the data in the new location.

    Released the mouse button

    You can select and drag multiple contiguous columns or rows.

    You can prevent or allow the user to drag and move with the CanUserDragDrop property in code.

    Using Code

    The following example allows the user to drag and move cells.

    CS
    Copy Code
    gcSpreadSheet1.CanUserDragDrop = true;
    
    VB.NET
    Copy Code
    GcSpreadSheet1.CanUserDragDrop = True
    
    See Also