Welcome to the Xceed Community | Help
Community Search  
More Search Options

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?
    Senior Technical Writer
    - Xceed Software

    In three words I can sum up everything I've learned about life: it goes on.
  •  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.
    Senior Technical Writer
    - Xceed Software

    In three words I can sum up everything I've learned about life: it goes on.
  •  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!


    Senior Technical Writer
    - Xceed Software

    In three words I can sum up everything I've learned about life: it goes on.
  •  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.
    Senior Technical Writer
    - Xceed Software

    In three words I can sum up everything I've learned about life: it goes on.
  •  01-28-2010, 5:15 AM Post no. 25579 in reply to 14290

    Re: Drag and drop across grids

    Hello,
    I'm considering to buy Xceed Datagrid but I would need full drag and drop capabilities out of the box (like the ones requested by the author of this post).
    Are these capabilities implemented in last version of the grid (v3.5)?

    Thank you in advance.
  •  02-01-2010, 3:55 PM Post no. 25602 in reply to 25579

    Re: Drag and drop across grids

    Hi RR,

    We do support dragging from the DataGrid (AllowDrag=true), however we do not support dropping onto the DataGrid out of the box. Let's say you have 3 columns of Double type, and you Drag from Excel 5 columns of String type, how should the DataGrid react?  That is why we decided that it is up to the client to handle the drop.

    Some help:
    http://xceed.com/CS/files/folders/jenny/entry11762.aspx
    http://xceed.com/CS/files/folders/jenny/entry14261.aspx
    http://www.beacosta.com/blog/?p=53

     


    ** Quick Tip: Clients with an active support subscription should be sending their questions by email if they wish to benefit from the faster response time. Thanks!


    Diane Lafontaine
    Technical Support
    Xceed Software Inc.
  •  05-19-2010, 5:28 PM Post no. 26907 in reply to 25602

    Re: Drag and drop across grids

    The two links on your site that you posted are not accessible. Can you please make them public?

    Thank you,

    Mick

  •  05-20-2010, 12:29 PM Post no. 26926 in reply to 26907

    Re: Drag and drop across grids

    Hi Mick,

    You need to be correctly signed in on our site to access those sample projects. I tested the links just now and they work fine.

     


    ** Quick Tip: Clients with an active support subscription should be sending their questions by email if they wish to benefit from the faster response time. Thanks!


    Diane Lafontaine
    Technical Support
    Xceed Software Inc.
  •  06-21-2010, 5:07 AM Post no. 27207 in reply to 25602

    Re: Drag and drop across grids

    Where in the DataGrid xaml do I add the draglist.DragDropHelper.IsDragSource?

     I have tried adding it to every bit of grid xaml but nothing happens - I use the Bea Costa code on normal lists a lot but I can't get it to work with the Xceed grid

     

View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.