TreeListView - cursor always set to arrow - nodragindicator cursor missing

4 posts, 1 answers
  1. Pooja
    Pooja avatar
    10 posts
    Member since:
    Oct 2014

    Posted 22 Jan 2015 Link to this post

    Hi,

    I want to use the default drag/no-drag cursors on the RadTreeListView control to keep it consistent with other controls. However I see that RadTreeListView implements OnGiveFeedback event and always sets the cursor to an 'Arrow' and also sets e.Handled to true. Firstly, the cursor here should be set based on DragDropEffects and should not be forced to Arrow. Secondly, e.Handled should not be set to true as one can never add a handler the OnGiveFeedback event which I can use to change the arrow. Attached is a screenshot..

    RadTreeListView.cs
    private void OnGiveFeedback(object sender, Telerik.Windows.DragDrop.GiveFeedbackEventArgs e)
      {
        e.SetCursor(Cursors.Arrow);
        e.Handled = true;
        if (e.Effects != DragDropEffects.None)
          return;
        this.OnDropImpossible(this.CurrentDragVisual);
      }
  2. Answer
    Nick
    Admin
    Nick avatar
    593 posts

    Posted 23 Jan 2015 Link to this post

    Hi Pooja,

    The behavior is an internal implementation for RadTreeListView, and the event is handled because of the controls specifications. You can still handle the event on your own if needed. Just subscribe to the GiveFeeedback event with handledEventsToo set to true. 

    Hope this helps. 

    Regards,
    Nick
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Pooja
    Pooja avatar
    10 posts
    Member since:
    Oct 2014

    Posted 23 Jan 2015 in reply to Nick Link to this post

    Thanks Nick. The workaround to handle the OnGiveFeedback event works. However why is the default RadTreeListView cursor behaviour inconsistent with other controls like RadGridView?  RadTreeListView should not always set the cursor to an Arrow.
  5. Nick
    Admin
    Nick avatar
    593 posts

    Posted 24 Jan 2015 Link to this post

    Hi Pooja,

    Actually RadGridView's out of the box drag and drop support is limited to Columns reordering and drag and drop grouping, in which cases the behavior is exactly the same as in RadTreeListView. Are you referring to the RowReorder example?

    Regards,
    Nick
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top