Drag&Drop issue

3 posts, 0 answers
  1. Raul
    Raul avatar
    20 posts
    Member since:
    Apr 2014

    Posted 17 Sep Link to this post

    Hello,

    when in edit mode with a row validation error it is still possible to perform Drag&Drop operations. They are not visible while performing the Drop, but the rows will be sorted just after clearing the row validation error.

    Greeting

    Raul

  2. Yoan
    Admin
    Yoan avatar
    1070 posts

    Posted 21 Sep Link to this post

    Hi Raul,

    I suppose that you are using our RowReorderBehaviour for reordering the rows. If yes, you can stop the drag&drop operation when the grid is in edit mode. In order to achieve this, you can use a boolean flag in OnDragInitialize method of the behaviour like so:
    private void OnDragInitialize(object sender, DragInitializeEventArgs e)
           {
               if (flag)
               {
                   return;
               }
               var sourceRow = e.OriginalSource as GridViewRow ?? (e.OriginalSource as FrameworkElement).ParentOfType<GridViewRow>();
               if (sourceRow != null && sourceRow.Name != "PART_RowResizer")
               {
                               .
                               . 
                               .

    You can set the flag in GridView's BeginningEdit and RowEditEnded events.

    Let me know if you need further assistance on this.

    Regards,
    Yoan
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Raul
    Raul avatar
    20 posts
    Member since:
    Apr 2014

    Posted 21 Sep Link to this post

    thanks, it helped me a lot :)
Back to Top