What's the best practice for doing this. Simply a dropdown that has custom items. I've tried this but can't get it to work. Get a javascript 'focus' error and data is not saved.
public class BTAreaIdControl : PropertySelectControlBase
{
public override void CreateEditControls()
{
base.CreateEditControls();
EditControl.Items.Add(new ListItem(CurrentPage.PageName, "1"));
EditControl.Items.Add(new ListItem("Annan sida", "2"));
}
public BTAreaId BTAreaId
{
get
{
return PropertyData as BTAreaId;
}
}
}
The BTAreaId class is as generated from VS.
Take a look at the sample code provided in this forum thread:
http://www.episerver.com/en/EPiServer_Knowledge_Center/Developer-Forum2/EPiServer-Developer-Forums-/EPiServer-CMS-version-5/13479/
/Mari