Unable to drag GridViewHeaderCell from RadGridView

3 posts, 0 answers
  1. Rob
    Rob avatar
    238 posts
    Member since:
    Jan 2009

    Posted 02 Dec 2013 Link to this post


    We have recently upgraded our telerik dll's and discovered a problem with drag and drop.  Our application would allow users to drag the GridViewHeaderCell to an area which would let them build charts based on that column.

    We were using RadDragAndDropManager and realised that it is unsupported, so I have attempted to move to the new DragDropManager but it does not work either.

    We have created a control called "DraggableControl" which we place into the GridViewHeaderCell.  We can see the control getting instantiated, and the drag events set, but when we physically drag it, the events are never fired.  Our control template looks like this.  As you can see we are setting the AllowDrag property which should mean we can drag this object?

    Any ideas as to what is wrong?  Is it possible to drag a grid view column header to somewhere outside the grid?

    <Style TargetType="controls:DraggableObject">
        <Setter Property="Telerik_Windows_Controls_DragDrop:RadDragAndDropManager.AllowDrag" Value="True" />
        <Setter Property="Template">
                <ControlTemplate TargetType="controls:DraggableObject">
                    <Grid Background="Pink" x:Name="xxx">
                        <ContentPresenter Content="{Binding}">

  2. Rob
    Rob avatar
    238 posts
    Member since:
    Jan 2009

    Posted 02 Dec 2013 Link to this post

    UPDATE:  I've managed to handle OnDrop in the drop area and the payload seems to have automatically been loaded by the radgridview.  I have pulled the payload object "HeaderCell" and can work with that...

    Unfortunately, I'm still not getting any feedback events so I'm unable to manipulate the cursors while dragging.  Any ideas on what I'm missing?
  3. Nick
    Nick avatar
    593 posts

    Posted 05 Dec 2013 Link to this post

    Hello Rob,

    It is possible to Drag a Column Header out of the Grid View, you just have to subscripe to the Drag Events with handled events too set to true since the GridView handles the events internally and you won't get the handlers fired otherwise. 

    let me know if that helps! 

    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top