CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > general_asp.net.web_parts_and_personalization Tags:
Item Type: Date Entered: 3/27/2007 1:57:14 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 3 Views: 52 Favorited: 0 Favorite
4 Items, 1 Pages 1 |< << Go >> >|
"Curt_C" <>
NewsGroup User
Web Part Property as a Color List?3/27/2007 1:57:14 PM

0

I have a public property on my web part, that shows in the PropertyGridEditor. It's defined as a type of System.Drawing.Color but it shows as a Textbox in the editor.... Is there a way to use the ENUM type (to get a nice dropdownlist) without having to manually create the static ENUM?


Curt Christianson
Chief Architect, df-Software.com
df-Software.com | StarterKits.org | Darkfalz.com | WebHost4Life | Microsoft MVP
"mharder" <>
NewsGroup User
Re: Web Part Property as a Color List?3/30/2007 8:09:59 AM

0

You'll have to create the enum yourself.  PropertyGridEditorPart only supports booleans, enums, strings, and types convertable to string.

If you want your WebPart property to be of type System.Drawing.Color, you can still get an enum in the PropertyGridEditorPart by making your WebPart implement ICustomTypeDescriptor.  You would need to override ICustomTypeDescriptor.GetProperties() to return a custom PropertyDescriptor where PropertyType returns your color enum instead of System.Drawing.Color.  This is possible but fairly complicated.

-Mike


http://blogs.msdn.com/mharder

This posting is provided "AS IS" with no warranties, and confers no rights.
"Curt_C" <>
NewsGroup User
Re: Web Part Property as a Color List?3/30/2007 12:30:10 PM

0

Thanks.,... that's what I was afraid of.
Curt Christianson
Chief Architect, df-Software.com
df-Software.com | StarterKits.org | Darkfalz.com | WebHost4Life | Microsoft MVP
"dmaulik142" <>
NewsGroup User
Re: Web Part Property as a Color List?2/1/2008 6:25:19 AM

0

Use this dear

 

[Browsable(true), Category("Mini Calendar Properties"), Description("Select a color"), FriendlyName("Select Highlighted Font Color"),
       WebPartStorage(Storage.Personal), XmlElement(typeof(System.Drawing.KnownColor))]
        public System.Drawing.KnownColor highlightFontColor
        {
            get
            {
                return _highlightFontColor;
            }
            set
            {
                _highlightFontColor = value;
            }
        }

 

From Maulik Patel 

4 Items, 1 Pages 1 |< << Go >> >|


Free Download:













retrieving the userid on a webform

formsauthenticationticket

recommendation on where to start.

session tracking cookies to be tied to an authenticated session.

problem with mail password / passordrecovery failing

aspencrypt

hybrid memebership/profile provider

'hello world' authentication problems

urlauthorizationmodule.checkurlaccessforprincipal ?

multiple destination from login, depending on role

recording failed logins

single membership provider but multiple profile providers and role providers...possible?

create user controls/login controls asp.net advice needed...

two registeration forms, then enter the data in database...

secure connection

documentation for membership schema?

change the security database aspnetdb to a different name

protecting a download folder

the remote server returned an error (401) unauthorised

abandoning user session

'formsauthentication.redirectfromloginpage' problem

about asp.net membership & profile

change password - wrong password entered

authorization & profile app. block

web form with menuu control

db hit for each property in profile object?!?

error message does not show in login control

please help - can you use the website administration tool with a custom provider for mysql???

invalid cast, customprincipal

how to get the current user name?

strange forms authentication problem

admin rights for non admin user

closing browser doesn't end session

unable to run sqlldr in a bat file called from an aspx page

membership encryption for classic asp

connecting login control to custom database?

membership issues

simple question

form authentication does not work

applying security to my website-reset password not working

prerequisite checking in a web application

sqlexception - machinename\aspnet not able to login to aspnetdb.mdf file: access denied

<credentials passwordformat="sha1" > in authentication mode="forms"

2 level log in

loginview never displays the loggedintemplate, even though i'm logged in

member administration

extending activedirectorymembershipprovider

impersonation & directory.exists

authentication with digital certificates

login to admin area of website not working

   
  Privacy | Contact Us
All Times Are GMT