Welcome to the Xceed Community Sign in | Join | Help
Community Search  

Drag and drop across grids

Sort Posts: Previous Next
  •  08-20-2008, 12:07 PM Post no. 14252

    Drag and drop across grids

    Can we drag and drop across two data grids in version 3.0? And is there any example.

     The excel data grid example only demonstrates the clip board cut and paste but I am looking at is selecting multiple rows from one grid and dragging/dropping them on anther grid.

    Any help or guidance would really help me out.

  •  08-20-2008, 2:02 PM Post no. 14255 in reply to 14252

    Re: Drag and drop across grids

    Can somebody guide me whether this is a supported feature in XCeed? Or we have to look for the same functionality in WPF Toolkit.

    Thanks

    atul

  •  08-20-2008, 2:12 PM Post no. 14256 in reply to 14255

    Re: Drag and drop across grids

    This feature is not built into Xceed DataGrid for WPF. The Excel cut/paste sample demonstrates how to copy from the grid (albeit to Excel) as well as how to paste rows (from Excel) to the grid. The same code would be valid for grid-to-grid operations; however, extra validation would most likely be required (e..g, unique IDs). Have you tried reusing the code in the sample to see if it meets your requirements for grid-to-grid copy paste?
    Technical Writer - Xceed Software

    Of all the things I've lost, I miss my mind the most. - Mark Twain
  •  08-20-2008, 2:52 PM Post no. 14259 in reply to 14256

    Re: Drag and drop across grids

    In the code all I found was:

     <Style TargetType="{x:Type xcdg:DataGridControl}">
                <EventSetter Event="PreviewKeyDown"
                             Handler="CopyPasteRows" />
             </Style>

             <Style x:Key="rowSelectorStyle"
                    TargetType="{x:Type xcdg:RowSelector}">
                <EventSetter Event="PreviewMouseLeftButtonDown"
                             Handler="SelectRow" />
             </Style>

             <Style TargetType="{x:Type xcdg:DataRow}">
                <Setter Property="xcdg:RowSelector.RowSelectorStyle"
                        Value="{StaticResource rowSelectorStyle}" />
             </Style>

    But this does not demonstrate any functionality.

    This is a the last piece of functionality which will make us go ahead with xceed grid. I would really appreciate if you can guide me with any example.

     Thanks

  •  08-20-2008, 2:54 PM Post no. 14260 in reply to 14259

    Re: Drag and drop across grids

    The code is in the code-behind .cs file. I am making an example as I type and will post it as soon as possible.
    Technical Writer - Xceed Software

    Of all the things I've lost, I miss my mind the most. - Mark Twain
  •  08-20-2008, 3:51 PM Post no. 14263 in reply to 14260

    Re: Drag and drop across grids

    http://xceed.com/CS/files/folders/jenny/entry14261.aspx

    Hope this helps!


    Technical Writer - Xceed Software

    Of all the things I've lost, I miss my mind the most. - Mark Twain
  •  08-20-2008, 4:48 PM Post no. 14264 in reply to 14263

    Re: Drag and drop across grids

    First of all many thanks for the quick solution.

    This is very helpful.

     Secondly, the only reason why I was asking was for the actual Dnd support provided inside the xceed. Means like when a particular row is selected, and then dragged over( an adorner comes up) and then when dropped on the second grid than those rows are added.

     The cut and paste by keys works great but the actual drag and drop where mousedown even is captured is where I was going.

    Sorry for not making it more clear, something like this http://www.codeproject.com/KB/WPF/ListViewDragDropManager.aspx

    I was hoping that may be there is something similar exposed out of the box. Or do we need to implement something on our own like http://blogs.msdn.com/llobo/archive/2008/02/26/drag-drop-library-updated.aspx .

    Any thoughts with examples will help.

    Thanks

  •  08-21-2008, 7:46 AM Post no. 14290 in reply to 14264

    Re: Drag and drop across grids

    We do not have anything for drag and drop exposed out of the box. This is something that you will need to implement yourself; however, should you have any questions long the way, please feel free to ask.
    Technical Writer - Xceed Software

    Of all the things I've lost, I miss my mind the most. - Mark Twain
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.