Sortable multiple object selector

by Richard Sustek (Kentico)
Sortable multiple object selector preview

Price

$0

Details

Licence:
Free
Works with:
9.0, 10.0
Version:

Summary

This form control will enable you to sort items dynamically using a simple drag & drop functionality.

Description

This form control can be used with any object type that UniSelector control itself supports. To use this form control just import the attached export package (don't forget to check "Import code files" option).

By default the form control is set up to use "cms.user" object type. If you want to use other type simply change the declaration of the UniSelector and configure "DisplayColumnName", "ValueColumnName" properties and "GetDataSource" method appropriately to reflect your object type.
 

Comments


Kentico_RichardS commented on

Hi Trevor,

Thanks for the comment! You are very close. I'm actually saving both "Value" and "DisplayName" in the result. In case you are using cms.user object type and you get UserID as Value and UserName as DisplayName, you will see something like this:

69,Andy;71,Arnold;73,Ronnie;70,SeanG

If I wouldn't store the display name, I would need to somehow get the object info in order to retrieve the display name which would be shown when you open the form control and this would be more complicated as each object type uses different provider (UserInfoProvider, DocumentHelper, TreeHelper, SiteInfoProvider etc..).

Feel free to let me know if you have any further questions!

Trevor commented on

Looks awesome, i assume when you save it just orders the bar separated list in the order you set?

Example if i have "a c b" as the order it saves as a|b|c in the form field?