We are using a RadGridView and have ListBoxes which we can drag items from into custom cells that contain Listboxes to received dropped items. The DragAndDrop works great, the issue is that most of the components that make up a RadGridView have AllowDrop=True which causes our items to disappear (seen easily in XAML/Silverlight Spy). Normally we use AllowDrop very selectively on only the places we desire. AllowDrop on the RadGridView itself is set to false, and I have managed to set AllowDrop on much of the grid by doing this:
sender, RowLoadedEventArgs e)
But we are also using Grouping, and the grouping panel has it set to True automatically. Using a style to set it isn't going to work, as in:
because we use an application theme but use a different theme on this RadGridView (Summer) and setting the style this way causes just the grouping row to inherit from the application theme (a different issue, See Here
). This solves the drag issue for us, but creates a visual issue. See Attached image.
I have tried subscribing to the grouping events Grouped and Grouping, but they don't seem to be firing, perhaps that is because we are creating the group in code using a ColumnGroupDescriptor instead of clicking through the UI.
This below however works on a single row after the user has clicked it, but before the user clicks it the AllowDrop is still True, if we could run that single line of code on all group rows, I think we'd be all set for this issue.
sender, GroupRowEventArgs e)
- RadGridView Theme is Summer, Application theme is Expression_Dark
- Listboxes we drag from use a CustomListBoxDragDropBehavior, we override CanDrop but returning false on it doesn't stop the "Drop" into the grid
How can we across the board disable AllowDrop on a RadGridView and only selectively turn it on for parts we want, or is there something else/other method we should be doing?