Try our conversational search powered by Generative AI!

Episerver two dropdown list connected

Vote:
 

So I am trying to create two dropdown list in Episerver using Selection factory. But I want to connect them somehow.

Something like Country -> Region,

is there a way that I could do that without using DOJO? Or do I have to use it?

[SelectOne(SelectionFactoryType = typeof(CustomCountryFactory))]
public string Country { get; set; }

[SelectOne(SelectionFactoryType = typeof(CustomCountryFactory1))]
public string Region{ get; set; }



public class CustomCountryFactory : ISelectionFactory
{
public IEnumerable GetSelections(ExtendedMetadata metadata)
{
var languages = new List
{
new SelectItem() { Text = "All", Value = "All" },
new SelectItem() { Text = "Norway", Value = "Norway" },
new SelectItem() { Text = "Sweden", Value = "Sweden" },
};

return languages;
}
}

For the other selection factory I am not sure what to do.

#186055
Dec 11, 2017 12:21
Vote:
 

Just follow this:


https://world.episerver.com/blogs/Duong-Nguyen/Dates/2014/1/Country-Region-drop-down-lists-in-All-properties-mode/

#186059
Dec 11, 2017 12:34
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.