RadGridView Reorder rows

11 posts, 0 answers
  1. troy
    troy avatar
    20 posts
    Member since:
    Jun 2008

    Posted 14 Jul 2011 Link to this post

    Your example for the Reorder rows is very good with the exception that I can't show the DropPreviewLine.  In the silverlight documentation it shows an example for it with the preview line, but neither the silverlight or WPF demo example have the preview line.  I am hoping that you have a WPF example that will show the preview line as well.

    Thanks!

    Troy
  2. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 19 Jul 2011 Link to this post

    Hello Troy,

    You may refer to this blog post. It illustrates a project that implements row reordering in RadGridView and displays a drop position indicator. Please, let me know whether this approach, meets your requirements.

    Best wishes,
    Ivan Ivanov
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. UI for WPF is Visual Studio 2017 Ready
  4. troy
    troy avatar
    20 posts
    Member since:
    Jun 2008

    Posted 19 Jul 2011 Link to this post

    I was looking for something more in line with how the tree view drop indicator looks since I am using drag and drop in both the tree view and grid view.  I would prefer they be consistent.  This is a link to a silverlight example in the help document:
    http://www.telerik.com/help/silverlight/raddraganddrop-within-radgridview.html

    Thanks!

    Troy
  5. Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 20 Jul 2011 Link to this post

    Hi Troy,

     I have prepared sample application, that provide same functionality as the one in the Silverlight article mentioned. Please, have a look at the attachment and let us know if you have any further questions.

    Best wishes,
    Tsvyatko
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  6. troy
    troy avatar
    20 posts
    Member since:
    Jun 2008

    Posted 20 Jul 2011 Link to this post

    This is exactly what I was looking for.  Thank you very much!
  7. Andrew
    Andrew avatar
    4 posts
    Member since:
    Oct 2012

    Posted 10 Nov 2014 Link to this post

    Has this solution been updated using the new (non deprecated) drag drop manager? Or is there a more current method of handling this? Thanks.
  8. Boris
    Admin
    Boris avatar
    276 posts

    Posted 11 Nov 2014 Link to this post

    Hello Andrew,

    A more up to date implementation of the demo you can look into the RowReorder WPF / Silverlight example. In addition, you can check the DragDropManager documentation for more details on how to use it.

    I hope this helps.

    Regards,
    Boris
    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.

     
  9. Thijs
    Thijs avatar
    2 posts
    Member since:
    Mar 2015

    Posted 21 Jun in reply to Boris Link to this post

    Boris, thanks for the update! One question though, in the deprecated WPF example, it shows a nice line as a drop position feedback tool instead of this weird tooltip debug message. 

     

    Is this behavior (having a nice line between the rows where you will drop the dragged item) still possible in the current iteration of telerik's (silverlight) radgridview? 

     

    Radtreeview does it natively without much hassle, and I very much prefer the clean drop line over the tooltip with text. 

     

    Thanks 

    Thijs

  10. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    371 posts

    Posted 22 Jun Link to this post

    Hello Thijs,

    I believe the Drag and Drop Within RadGridView demo from our SDK Samples Browser demonstrates the desired behavior. Of course, you are free to modify that to suit your requirements.

    Could you please have a look at it and let me know if it works for you?

    Regards,
    Dilyan Traykov
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  11. Thijs
    Thijs avatar
    2 posts
    Member since:
    Mar 2015

    Posted 22 Jun in reply to Dilyan Traykov Link to this post

    Dear Dilyan, 

    Thank you for your answer. Unfortunately that example also uses the descriptive tooltip "Dragging Item before/after rowitem" instead of a "droppreviewline" 

     

    To clarify please see the two attached files from your demo site. 

    The behavior I'd like to enable or implement is the IsDropPreviewLineEnabled functionality, but on a gridview. 

     

    So to just have a thin colored line to show the position where the item will inserted after a drop instead of a tooltip describing where it will drop. 

    So, of these 2 screenshots, the one shown in "RadTreeView_TreeViewDragAndDrop_060" is the one I want.. 

     

    But then on a radgridview instead of a treeview. 

     

    Any idea if at all possible?

     

  12. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    371 posts

    Posted 22 Jun Link to this post

    Hello Thijs,

    This is indeed possible, using the aforementioned SDK example. The only modification you need to make is to remove the following lines from the OnDragInitialize method of the RowReorderBehavior:

    e.DragVisual = new DragVisual()
    {
        Content = details,
        ContentTemplate = this.AssociatedObject.Resources["DraggedItemTemplate"] as DataTemplate
    };

    You could also modify the drop position feedback presenter in the CreateDefaultDropPositionFeedback method and change the created Ellipse's Fill color to White to exactly match the RadTreeView implementation.

    I hope this produces the desired behavior.

    Regards,
    Dilyan Traykov
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for WPF is Visual Studio 2017 Ready