Update Database from codebehind

4 posts, 0 answers
  1. Karl
    Karl avatar
    172 posts
    Member since:
    Jun 2009

    Posted 14 Oct 2010 Link to this post

    Hi.

    Do you have any examples on how to update the database from the CodeBehind when a user drags and item to another listbox?

    I don't want to use any SQL or Object datasource, I would like to do it all from the CodeBehind?

    Many thanks
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 15 Oct 2010 Link to this post

    Hello Karl,


    I hope you can perform the code in "Dropped" event of RadListBox. The Dropped event fires after the Dropping event (if not cancelled). Attach the Dropped event and add your code to update db in the handler.



    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Karl
    Karl avatar
    172 posts
    Member since:
    Jun 2009

    Posted 15 Oct 2010 Link to this post

    Thanks, that works if I drag and drop over another control but not if I drag to the RadListbox itself, what even gets fired then?

    Thanks
  5. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 19 Oct 2010 Link to this post

    Hi Karl,

    In this case you should subscribe to OnReordered event of the listbox. Also note that AutoPostBackOnReorder property should be set to "true".

    Kind regards,
    Yana
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top