Capturing RadDock Order

4 posts, 0 answers
  1. JJ
    JJ avatar
    21 posts
    Member since:
    Jan 2008

    Posted 04 Feb 2008 Link to this post

    I have a client who requires the ability to manage dropdownlist orders.  I've created a database table with a 'Sort' field to initially capture it.  Now I'm researching a means to update the order.  I'm considering presenting the Name/Value pair in the order they're returned from the database in a RadDock.  Then the user could manually move the items around and click a save button to capture the new ordering (top to bottom).  I would like to know if you have any examples that demonstrate this functionality within a RadDock.

    Thanks,

    Jeff
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 06 Feb 2008 Link to this post

    Hi Jeff,

    I suggest to take a look at the following threads, which explain scenarios similar to yours. Feel free to modify them in order to meet your requirements.

    show dock IDs in their order
    get docks' positions

    I hope this information will get you started.



    Sincerely yours,
    Svetlina
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. JJ
    JJ avatar
    21 posts
    Member since:
    Jan 2008

    Posted 06 Feb 2008 Link to this post

    Thanks Svetlina,

    I've reviewed the examples you provided but was unsuccessful in implementing a solution.

    My setup is rather simple.  I have one RadDockLayout with one RadDockZone.  I then dynamically add two RadDocks.  The user can then change the order of the docks and click a save button.  I simply want to capture that new order and update my database, but when I use the loop below, the order I receive is the original order in which they were added.

    RadDockZone rdz1 = (RadDockZone)Page.FindControl("RadDockZone1");

    foreach (RadDock rd in rdz1.Docks)
    {
           //get rd info
    }

    Your help is greatly appreciated,

    Jeff
  4. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 07 Feb 2008 Link to this post

    Hello Jeff,

    You can find how to save the dynamically created docks' order in this demo.It demonstrates exactly your scenario, but instead in a List structure you must save the information in your database. I suppose that when you click the button and perform a postback before getting into the loop, you dynamically recreate the docks and that is why its result is the original order.


    Regards,
    Svetlina
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top