
gong-wpf-dragdrop - issue #33
Dragging a single item from a grouped datagrid will often return CollectionViewGroupInternal rather than the item
>What steps will reproduce the problem? 1. I modified the DefaultsExample by adding a 'DataGrid with Groups' tab bound to the same GroupedCollectionViewSource as in the 'Listbox with groups' tab
>What is the expected output? What do you see instead? Sometimes it would work as expected as it does in 'Listbox with Groups' but most of the time the dropInfo.Data was a CollectionViewGroupInternal instead of a GroupedItem which caused an exception. Dragging multiple items always worked after I modified Data.Drop.
I suspect the problem maybe the DataGrid itself.
>What version of the product are you using? Latest from subversion
- Window1.xaml 15.54KB
- Data.cs 4.76KB
Comment #1
Posted on Jul 25, 2011 by Swift BearI found a fix. I updated to .net 4.0 and changed ItemsControlExtensions.GetItemContainerType by adding if (itemsControl is DataGrid) { return typeof (DataGridRow); } to the start of the method.
Status: New
Labels:
Type-Defect
Priority-Medium