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

Auto scroll on Grid View

12 Answers 242 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Russell Mason
Top achievements
Rank 1
Russell Mason asked on 29 May 2010, 04:10 PM

Hi

The documentation says RadDragAndDropManager will 'automatically use ScrollViewers'. I can't seem to get this to work with a RadGridView (or on your sample http://demos.telerik.com/silverlight/#DragAndDrop/TreeToGrid).

Does the grid not use a ScrollViewer or do I need to enable something additionally againt the grid?

Thanks
Russell Mason

12 Answers, 1 is accepted

Sort by
0
Bobi
Telerik team
answered on 02 Jun 2010, 12:02 PM
Hi Russell Mason,

It is not clear enough what exactly are you trying to achieve.
The default behavior of Grids ScrollBar is Auto. So if you try to add some more items in the grid then the scroll will appear. If you want to have visible scroll when having less items then you can try to use the following:
                         <gridview:RadGridView ScrollViewer.VerticalScrollBarVisibility="Visible"/>
I hope that this will help you.
 Please let us know if you have any other questions or need some more help.

Best wishes,
Bobi
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
Russell Mason
Top achievements
Rank 1
answered on 02 Jun 2010, 03:18 PM

Hi

Sorry for not making my scenario clear enough.

I have a grid with a number or rows, lets say 20 for the sake of argument. The viewable area is only big enough for say 10 rows so the vertical scroll bar appears.

I want to drag an item to this grid and drop it on a specific row. This is fine for the 10 rows that are visible but whilst I am draging the other 10 rows can not be accessed.

In the TreeView or ListBox, for example, when I drag I can place the mouse close to the edge of the control and the other items automatically scroll into view (RadDragAndDropManager will automatically use ScrollViewers). This behaviour does not seem to be the case with the Grid.

Maybe this could go in the RadGridView or the RadDragAndDropManager forum, but I'm not sure which control is responsible!

Hope that clarifies what I am after.

Thanks
Russell Mason

0
Valentin.Stoychev
Telerik team
answered on 03 Jun 2010, 10:59 AM
Hello Russell Mason,

Please check this blog post where this is explained:
Update 2: In addition you can check the version that enables auto scrolling while dragging items in Silverlight - SL.RowReorder.AutoScroll


Best wishes,
Valentin.Stoychev
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
Tim
Top achievements
Rank 1
answered on 23 Aug 2011, 09:09 PM
Telerik Team,

Can you show me how to enable automatic scrolling for drag and drop operations?  I am confused  by your previous posts on 3 points:

1. The telerik documentation says that drag and drop will automaitcally scroll the control if needed:  http://www.telerik.com/products/silverlight/drag-drop.aspx.  I agree with Russell, that the that the documentation does not appear to be accurate.  None of the 3 controls on the demo (treeview, gridview, listbox) do any automatic scrolling when filled with lots of items.  Try it here:  http://demos.telerik.com/silverlight/#DragAndDrop/TreeToGrid.  I cannot get it to scroll?  Can you tell me how to make it scroll?  Is there a demo that illustrates this feature?

2. The last post says to check out a blog post at this location, but this link seems dead?  http://blogs.telerik.com/tsvyatkokonov/posts/10-05-20/enable_radgridview_rsquo_s_rows_reorder_functionality_using_behaviors.aspx

3. The last post says to check out this demo at this location:  http://blogs.telerik.com/Libraries/TsvyatkoKonov_Library/SL_RowReorder_AutoScroll.sflb  But there are two problems with this demo:
a. The behavior implemented is not automatic.
b. The behavior implemented requries you to constantly "shake" or move the item at the bottom of the top of the grid to keep the grid scrolling.  If you stop moving or shaking the item at the bottom or top, the scrolling will stop.

Can you explain how to properly use automatic scrolling with drag and drop?

Thanks for your help,

Tim
0
Tim
Top achievements
Rank 1
answered on 24 Aug 2011, 08:38 PM
While not a gridview, this example actually has real automatic scrolling.  
    http://www.telerik.com/help/silverlight/raddraganddrop-within-listbox.html

However, this example has several problems as well:
  1. The control template xaml is not parse-able in its current state.  It will need to be updated/fixed before use.
  2. If you move the example to a childwindow (with no other changes), the automatic scrolling stops working again.

What is the best way to achieve consistent automatic scrolling with the RadDragAndDropManager?

Thanks!

0
Dimitrina
Telerik team
answered on 26 Aug 2011, 03:07 PM
Hello Tim,

I tested the demo that you reference: http://demos.telerik.com/silverlight/#DragAndDrop/TreeToGrid.  It is scrolling the right way at my end.

Generally with Q2 we have introduced a new DragAndDropManager. May you please specify if you are using the RadDragAndDropManager or the DragDropManager? You may find helpful this help article about the drag ExecutionMode.

Indeed you are right that our help needs an update on this topic. If you are using the new DragDropManager then the scrolling have to be implemented additionally as a behavior.

May you please send us a sample problem showing the inconsisten behavior of the suggested scrolling?

Greetings,
Didie
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Tim
Top achievements
Rank 1
answered on 26 Aug 2011, 07:30 PM
Didie,

Thanks for the quick reply. 

1. You are correct.   http://demos.telerik.com/silverlight/#DragAndDrop/TreeToGrid is working fine now.  That is really weird, but I'll take it!  (Still have a problem with childwindows, though).

2.  We are using RadDragAndDropManager (not DradDropManager) because we want auto-scrolling. 

3. Your advice on ExcutionMode = Legacy made our MainWindow auto-scroll consistently, but not the ChildWindow.

4. With the exact same code (simply swapping out the dlls) we see this behavior, using RadDragAndDropManager.  MainWindow and ChildWindow share the same code, but ChildWindow does not seem to work.

Version                        ExecutionMode    MainWindow Scrolling    ChildWindow Scrolling
2010.1.515.1040         n/a                       YES                                no
2011.2.0712.1040       Legacy                 YES                                no
2011.2.0712.1040       Default                  no                                  no
    
5. I uploaded a solution via a support ticket (458309) using a ListBox to demonstrate that the ChildWindow does not do auto-scrolling.  Can you show me how to enable auto-scrolling on the ChildWindow, too?

Thanks!
0
Tsvyatko
Telerik team
answered on 29 Aug 2011, 08:25 AM
Hi Tim,

 You can enable auto-scroll within child window by adding this window within the e.Options.ParticipatingVisualRoots collection. More information about this can found in this helps article - http://www.telerik.com/help/silverlight/raddraganddrop-child-window-non-telerik-popups.html

I have attached the modified project demonstrating how to achieve this. Let us know if you have any further issues/questions regarding this scenario.

Regards,
Tsvyatko
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Tim
Top achievements
Rank 1
answered on 30 Aug 2011, 04:03 PM
Tsvyatko,

I am now able to consistenly achieve auto-scrolling across serveral recent versions of Telerik DLLs and in both ChildWindows and regular windows.  Thanks for your help!

One final tweak... Must I remove the added UIElement from the ParticipatingVisualRoots collection when I close the child window to prevent memory leaks?
0
Pavel Pavlov
Telerik team
answered on 01 Sep 2011, 02:44 PM
Hi Tim,

Internally weak references are used when handling the participating visual roots. So in short  i believe there is no need to remove them form the collection. Or code takes care to unsubscribe / free the references.

However in case you observe any memory leaks , do not hesitate to report them .

Greetings,
Pavel Pavlov
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Tim
Top achievements
Rank 1
answered on 01 Sep 2011, 04:52 PM
Makes sense.  Auto-scrolling is working everywhere now.

Thank you for your help!
0
Trang
Top achievements
Rank 1
answered on 12 Jul 2012, 03:46 PM
The sample provided has an older version that I got. I have tried replace with my version 2011.3.1116.1040 but it still does not auto scrolling.  Please advice.  I suggested Telerik to my company and we currently have 10 licenses.  If this does not work.  I really don't know how to tell them.  I'm using listbox with DragDropManager.  I switch to use the RadDragAndDropManager but it does not auto scroll.

Thank you,
Trang
Tags
DragAndDrop
Asked by
Russell Mason
Top achievements
Rank 1
Answers by
Bobi
Telerik team
Russell Mason
Top achievements
Rank 1
Valentin.Stoychev
Telerik team
Tim
Top achievements
Rank 1
Dimitrina
Telerik team
Tsvyatko
Telerik team
Pavel Pavlov
Telerik team
Trang
Top achievements
Rank 1
Share this question
or