This is a migrated thread and some comments may be shown as answers.

TreeListView - cursor always set to arrow - nodragindicator cursor missing

3 Answers 71 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Pooja
Top achievements
Rank 1
Pooja asked on 22 Jan 2015, 10:59 PM
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);
  }

3 Answers, 1 is accepted

Sort by
0
Accepted
Nick
Telerik team
answered on 23 Jan 2015, 12:43 PM
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.

 
0
Pooja
Top achievements
Rank 1
answered on 23 Jan 2015, 09:25 PM
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.
0
Nick
Telerik team
answered on 24 Jan 2015, 02:29 PM
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.

 
Tags
TreeListView
Asked by
Pooja
Top achievements
Rank 1
Answers by
Nick
Telerik team
Pooja
Top achievements
Rank 1
Share this question
or