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

Issue with "Drag and Drop within RadGridView" Demo

6 Answers 86 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 01 Apr 2014, 06:51 AM
Hi,

I have an issue with rowreordering as shown in the following demo: http://www.telerik.com/help/silverlight/dragdropmanager-howto-draganddrop-within-radgridview.html
The problem lies with the positionFeedback.
There's no problem when you do not hide the groupPanel, but when you do, you get some empty white space above your grid when dragging.

Reproducing the problem:
Add the following line to the XAML of the RadGridView: ShowGroupPanel="False"

When you run the demo and start dragging, you'll notice everything gets pushed down because of the white space on top.
Additionally, when the white space gets added at first, the position of the PositionFeedback is also wrong.
The attached screenshot should add some clarification to the above.

Is there a way I can show the PositionFeedback without that white space on top while not showing the groupPanel?
I'm not really keen on changing the style of the RadGridView to get something like it added in, I'd prefer that it stays in the behavior itself.

Peter

6 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 03 Apr 2014, 12:38 PM
Hi Peter,

I have tested the case on the Reorder Rows online demo having 
ShowGroupPanel="False".

I was not able to reproduce such a problem though. Would you please check it and let me know how can I reproduce the issue there?

Regards,
Didie
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
Peter
Top achievements
Rank 1
answered on 03 Apr 2014, 02:26 PM
Hi Didie,

I did not refer to the online demo.
I referred to the demo included in the Silverlight Documentation of Telerik: See this link
With that code, you get a working sample for rowreordering within a RadGridView.

However, if you add the following line in the mainpage xaml, you get the bug I am talking about. (see also the attached screenshot of my xaml)
ShowGroupPanel="False"

Regards,
Peter

0
Dimitrina
Telerik team
answered on 08 Apr 2014, 07:56 AM
Hi Peter,

I was able to reproduce the issue using the exact same code from the demo when the GroupPanel is hidden.

I logged it into our system and we will further investigate the case. Meanwhile we suggest following the Reorder Rows online example.

Regards,
Didie
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
Accepted
Sam
Top achievements
Rank 2
answered on 09 Apr 2014, 09:52 AM
We got the same issue in our project. Here's a simple workaround we have applied:
1. Put the RadGridView into a Grid
2. In the RowReorderBehavior class, in the method AttachDropPositionFeedback()
    Change this line of code:
            this.dropPositionFeedbackPresenterHost = this.AssociatedObject.ChildrenOfType<Grid>().FirstOrDefault();
    To:
            this.dropPositionFeedbackPresenterHost = this.AssociatedObject.ParentOfType<Grid>(); //The grid containing the GridView will become the Content Presenter.

After that the DropPositionFeedback element will be inserted to the grid outside of the RadGridView so that the group panel will not be enlarged.

Hope it helps.



0
Dimitrina
Telerik team
answered on 10 Apr 2014, 03:30 PM
Hi Sam,

Thank you for the suggestion! It indeed resolves the issue.

I tried it and at first I got a COM exception initially. 
Then I attached the behavior after RadGridView's data is loaded and it worked fine.
For example:
this.radGridView.DataLoaded += radGridView_DataLoaded;
void radGridView_DataLoaded(object sender, EventArgs e)
{
    RowReorderBehavior.SetIsEnabled(this.radGridView, true);
}

Thank you for sharing your solution.

Regards,
Didie
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
Peter
Top achievements
Rank 1
answered on 11 Apr 2014, 07:05 AM
Hi Sam,

I had to create my DropPositionFeedback after the extra grid was loaded, but it's working now.
Thanks for the work around.

Peter
Tags
DragAndDrop
Asked by
Peter
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Peter
Top achievements
Rank 1
Sam
Top achievements
Rank 2
Share this question
or