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

GridView scroll when dragging item at the bottom of the list.

5 Answers 72 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Thomas Van den Bossche
Top achievements
Rank 1
Thomas Van den Bossche asked on 22 Oct 2009, 02:34 PM
Dear,

When I'm dragging a row from one GridView to another and I'm at the bottom of the GridView (where I want to drop the row), the GridView won't scroll down (I've attached an image to make the problem clearer).
Is there a property available which enables this or do I need to implement this myself? Just to make sure I don't do extra work :o)

Thanks in advance!

5 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 23 Oct 2009, 08:52 AM
Hi Thomas,

Thank you for contacting us. Dag & drop functionality is not directly supported in RadGridView. We have it as a feature request in our TODO list, however it is not yet scheduled and I can't say when it will be implemented. So, you have to manually update GridElement.VScrollBar.Value property when the mouse reaches the last visible row. If you need further assistance with this, please write me back.

Kind regards,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Thomas Van den Bossche
Top achievements
Rank 1
answered on 28 Oct 2009, 08:58 AM
What is the best way to ensure that we're at the last visible row?
Thanks in advance!
0
Jack
Telerik team
answered on 28 Oct 2009, 10:41 AM
Hi Thomas,

You should get the last item in VisualRows collection. Here is a sample:

GridRowElement row = this.radGridView1.GridElement.VisualRows[this.radGridView1.GridElement.VisualRows.Count - 1];
GridViewRowInfo lastVisibleInfo = row.RowInfo;
//...

I hope this helps. If you have any further questions, don't hesitate to ask.

Best wishes,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Thomas Van den Bossche
Top achievements
Rank 1
answered on 28 Oct 2009, 10:54 AM
If I use this method, the Location is always (0, 0).

RadElement row = gridAssigned.GridElement.VisualRows[ gridAssigned.GridElement.VisualRows.Count - 1 ]; 
Point loc = row.Location; // this is always (0, 0) 

This way I can't determine when I'm at the last row.
I'm using the DragOver-event of the GridView and I'm trying to calculate with the mouse-position and the location of the last visible row if I need to scroll down.


0
Jack
Telerik team
answered on 28 Oct 2009, 12:00 PM
Hi Thomas,

I understand your concerns. The last row in VisibleRows collection is indeed the last visible row. However, you can't use the Location property to get its location. You should use BoundingRectangle and ControlBoundingRectangle properties instead. The first one returns the location corresponding to the parent element (GridTableBodyElement in this specific case) and the second returns coordinates corresponding to RadGridView control. I know, it sounds weird. I added the issue to our bug tracking system, and it will be considered when planning our next release. If you need further assistance, please feel free to contact me back.

Regards,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Thomas Van den Bossche
Top achievements
Rank 1
Answers by
Jack
Telerik team
Thomas Van den Bossche
Top achievements
Rank 1
Share this question
or