This is a migrated thread and some comments may be shown as answers.

Capturing RadDock Order

3 Answers 89 Views
Dock
This is a migrated thread and some comments may be shown as answers.
JJ
Top achievements
Rank 1
JJ asked on 04 Feb 2008, 09:24 PM
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

3 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 06 Feb 2008, 11:39 AM
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
0
JJ
Top achievements
Rank 1
answered on 06 Feb 2008, 05:36 PM
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
0
Svetlina Anati
Telerik team
answered on 07 Feb 2008, 01:40 PM
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
Tags
Dock
Asked by
JJ
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
JJ
Top achievements
Rank 1
Share this question
or