This is a migrated thread and some comments may be shown as answers.
Customize TreeViewDragCue
3 Answers 58 Views
This is a migrated thread and some comments may be shown as answers.
Randall Nelson
Top achievements
Rank 1
Randall Nelson asked on 10 Feb 2010, 04:30 PM
My application allows for a drag from selected records in a RadGridView.  I am using the TreeViewDragCue to display the records that are being dragged, and it is working very nicely.  But I would like to make two changes to it. 

First, I would like the DragToolTip to appear on the top rather than the bottom (when there are many records selected, this tool tip can disappear off the bottom of the screen). 

Second, I would like to limit the number of records displayed (a user might select 100 records).

Any ideas on how I can do this?

3 Answers, 1 is accepted

Sort by
0
Accepted
Tihomir Petkov
Telerik team
answered on 12 Feb 2010, 02:36 PM
Hello Randall,

There is no handy way to make the DragCue be displayed above the mouse pointer. What you can do if you can somehow calculate the height of the DragCue, is to set negative top margin.

As for restricting the number of records shown in the DragCue, I believe there should be no problem about that - after all you are the one who determines what, if anything, will be visible in the DragCue. Simply check for the number of records that is in the Payload and put only as many as you want in the DragCue.

Best wishes,
Tihomir Petkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Randall Nelson
Top achievements
Rank 1
answered on 15 Feb 2010, 08:23 PM
Thanks for the reply.  On limiting the number of records in the DragCue - I guess I could work it like this:

* When OnDragQuery fires - fill the payload up with all the selected records.  Then put 5 or 10 of the records in a class list<> variable.
* When OnDragInfo fires - assign this class list<> variable to the cue's itemsource rather than assigning the payload to the itemsource.

Was that what you were thinking?
0
Tihomir Petkov
Telerik team
answered on 17 Feb 2010, 02:22 PM
Hello Randall,

Well, you can do it in various ways, but - yes, what you described should work. The principle is the same - use the payload to carry the actual data and the drag cue to only give feedback to the user.

All the best,
Tihomir Petkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Asked by
Randall Nelson
Top achievements
Rank 1
Answers by
Tihomir Petkov
Telerik team
Randall Nelson
Top achievements
Rank 1
Share this question
or