Multi select in SharePoint Web Part Shared Settings?
Im trying to figure out how to create a multi select box in the shared settings section of a SharePoint Web Part. A regular drop down looks l开发者_StackOverflowike this
public enum SortByEnum { DESC, ASC }; // Set default value first!
protected SortByEnum sortBy;
[Category("Some category"),
WebBrowsable(true),
Personalizable(PersonalizationScope.Shared),
WebDisplayName("Sort order"),
WebDescription("ASC = oldest first, DESC = Newest first")]
public SortByEnum SortBy
{
get { return sortBy; }
set { sortBy = value; }
}
Now, anyone who could help me how to make this to a multi select?
You have to implement custom Editor Part and then add MultiSelect ListBox control to it.
See implementing Custom Editor Part:
http://vspug.com/tonstegeman/2007/08/04/creating-custom-editor-parts-for-a-sharepoint-webpart/
精彩评论