Hi,
What I want to do is to allow users to select multiple records on XamDataGrid (using ctrl + click) and then drag selected records out of the grid. However, when I set AllowEdit to False and CellClickAction to SelectRecord drag and drop stops working. Instead of dragging it selects cells. With AllowEdit and CellClickAction having their default values dragging works but I don't want allow users to edit data.
Can anybody help me solve this problem? I'm using Drag and Drop framework. Here is my sample code:
<igDP:XamDataGrid Name="xamDataGrid1" DataSource="{Binding}"> <igDP:XamDataGrid.FieldLayoutSettings> <igDP:FieldLayoutSettings AutoGenerateFields="True" /> </igDP:XamDataGrid.FieldLayoutSettings> <igDP:XamDataGrid.FieldSettings> <igDP:FieldSettings AllowEdit="False" CellClickAction="SelectRecord" /> </igDP:XamDataGrid.FieldSettings> <ig:DragDropManager.DragSource> <ig:DragSource IsDraggable="True" DragChannels="ChannelA"> </ig:DragSource> </ig:DragDropManager.DragSource></igDP:XamDataGrid>
Thanks
Bart
you might want to take a look at this post.
I think the solution to your problem is to insert the default DataPersenter style to your XamDataGrids. Then you have to insert the DragDropManager into this styles as descibed in the forum post.
Now you just need to set one of your XamDataGrids as source and the other one as target in the DragDropManager and handle the events in code behind.
I hope this helps.
Sincerely,
Darius
Is there any update on this thread? I would like to use ig:DragDropManager to implement dragdrop multiple items between XamDataGrids. The sample given does not use DragDropManager and lacks all the features that offers.
Like the original post, I don't want my XamDataGrid cells to be editable.
Hi Krasimir,
could you please show me in your example how I can drag multiple rows within the xamDataGrid.
Hello,
I am just checking if you require any further assistance on the matter.
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Hello Bart,
I have been looking into the behavior that you have described and it seems that the reason for the drag to not start when you are setting AllowEdit to false and the CellClickAction to SelectRecord, the click event does not bubbles to the XamDataGrid and since you are setting the DragSource to it the drag action is not performed. I have created a sample application for you, which shows an approach for implementing drag and drop of a multiple record of the XamDataGrid to a XamDataTree.
If you need any further assistance please do not hesitate to ask.