Issue with "Drag and Drop within RadGridView" Demo

7 posts, 1 answers
  1. Peter
    Peter avatar
    8 posts
    Member since:
    Feb 2013

    Posted 01 Apr 2014 Link to this post

    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
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 03 Apr 2014 Link to this post

    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.

     
  3. DevCraft banner
  4. Peter
    Peter avatar
    8 posts
    Member since:
    Feb 2013

    Posted 03 Apr 2014 in reply to Dimitrina Link to this post

    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

  5. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 08 Apr 2014 Link to this post

    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.

     
  6. Answer
    Sam
    Sam avatar
    1 posts
    Member since:
    Aug 2012

    Posted 09 Apr 2014 Link to this post

    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.



  7. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 10 Apr 2014 Link to this post

    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.

     
  8. Peter
    Peter avatar
    8 posts
    Member since:
    Feb 2013

    Posted 11 Apr 2014 in reply to Sam Link to this post

    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
Back to Top
DevCraft banner