Disable PostBack on Dropped Item

5 posts, 0 answers
  1. Shimon Dahan
    Shimon Dahan avatar
    2 posts
    Member since:
    Jan 2010

    Posted 15 Jan 2010 Link to this post

    hi,

    I use RadGrid to manipulate row promotion level. I Enabled the user to drag and drop rows to set the drraged item position.

    I need to manipulate my datasbase when the dragging finish.

    I wish to do this with javascript that invoke WCF service and pass the relevant parameters.

    the problem is when the row dropped,  the page Posback to server and the user need to wait until the updating  to DB will finish.

    I only need help to disable this postBack.

    (When I use set_cancel method in the droppedEvent Nothing Changed and if I use it in the Drraging event the Dropped Event no Fired at all).

    Thanks.
    sorry about my English.. :)

    shimon
  2. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2289 posts

    Posted 19 Jan 2010 Link to this post

    Hello Shimon,

    You can cancel the postback by canceling within OnRowDropping handler. This will prevent from postback.

    Sincerely yours,
    Nikolay
    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.
  3. Shimon Dahan
    Shimon Dahan avatar
    2 posts
    Member since:
    Jan 2010

    Posted 19 Jan 2010 Link to this post

    But When I use set_cancel method in the droppedEvent Nothing Changed and if I use it in the Drraging event the Dropped Event no Fired at all and I Cant Call the service with the relevant parameters(DropPosiiton)

    thanks
  4. Schlurk
    Schlurk avatar
    812 posts
    Member since:
    May 2009

    Posted 19 Jan 2010 Link to this post

    Are you subscribing to the OnNodeDropping or OnNodeDropped event? Since OnNodeDropped happens after a node has been dropped it would most likely seem as though canceling it does nothing. As Nikolay suggested I believe you need to cancel the OnNodeDropping event (not OnNodeDropped).
  5. Flavien
    Flavien avatar
    4 posts
    Member since:
    Apr 2010

    Posted 12 Jul Link to this post

    I had the same issue and it took a while before I understand the problem.

    You are using RowDropped event instead of RowDropping (yes you can't cancel a postback once it already happend)

Back to Top