Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

Drop-down list in web part properties pane

  Asked By: Garret Stephenson         Date: Nov 17, 2005      Category: Sharepoint      Views: 2506
 

does anyone have code or an example of how to add a drop-down list
to the properties pane of a web part (in vb)? It seems that the
Microsoft documentation is down and the few articles I've found aren't
very helpful.

Tagged:                

 

4 Answers Found

 
Answer #1       Answered By: Tyron Calderon          Answered On: Nov 17, 2005       

You'll want to look at using an enum property. I'm totally offline and have no
SharePoint access right now. If that doesn't get you going, post again.

 
Answer #2       Answered By: Irvin Foley          Answered On: Nov 17, 2005       

I know to use the enum property, but am
basically clueless as how to acutally implement it. Do I create a new
class? Any tips or guidance would be most helpful.

 
Answer #3       Answered By: Deonte Stein          Answered On: Nov 17, 2005       

Here is the code  I have so far. It gives me the "Windows SharePoint
Services cannot deserialize the web  Part" error. What else do I need
to add  to my project file for this to create a dropdown list  in the
properties pane?



Private colorPicked As MyColors

Public Enum MyColors
Red = 0
Blue = 1
Green = 2
End Enum

<Browsable(True), Category("Select Color"), DefaultValue(""), _
WebPartStorage(Storage.Shared), FriendlyName("Color"), _
Description("")> _
Property BorderStyle() As MyColors
Get
Return colorPicked
End Get
Set(ByVal Value As MyColors)
colorPicked = Value
End Set
End Property

 
Answer #4       Answered By: Stephon Valentine          Answered On: Nov 17, 2005       

Check out the following link. Hopefully you can find answers for your question.

http://www.15seconds.com/issue/040219.htm

 
Didn't find what you were looking for? Find more on Drop-down list in web part properties pane Or get search suggestion and latest updates.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].