Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

Episerver two dropdown list connected

$
0
0

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<ISelectItem> GetSelections(ExtendedMetadata metadata)
{
var languages = new List<SelectItem>
{
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.


Viewing all articles
Browse latest Browse all 9076

Trending Articles