Webpart properties' title?

Last post 06-04-2004 1:50 PM by Fredrik N. 3 replies.

Sort Posts:

  • Webpart properties' title?

    05-30-2004, 4:35 PM
    • Member
      30 point Member
    • dcanevet
    • Member since 05-30-2004, 4:16 PM
    • PARIS - FRANCE
    • Posts 6
    Hi,
    My custom control has a simple property:

    [Personalizable(true)]
    [WebBrowsable(true)]
    public string Mystring
    { get {...

    In a PropertyGridEditorPart, I can thus modify my property. However, the editor is using "Mystring" as the label for the input text box. How do I modify its label?

    Thanks,
    Denis CANEVET
    Denis CANEVET
  • Re: Webpart properties' title?

    05-30-2004, 5:59 PM
    • All-Star
      29,644 point All-Star
    • Fredrik N
    • Member since 06-22-2002, 1:03 AM
    • Sweden
    • Posts 5,334
    You can't :( The name will as you have notice the name of the property. Hopefully Microsoft is going to add an attribute for this, example FriendlyNameAttrbiute.

    I’m working on a PropertyGrid for ASP.Net 2.0 that today uses a FriendlyNameAttribute and the Description attribute to display another name than the Property name and also add a description for the property. With my solution you can also add an attribute for a Property where you specify which server control you want to display for the property on the ProeprtyGrid. For example, if you have a string property that should have the RGB value of a color, you could build your own server control that for example shows a palette. This control could then be displayed in the ProeprtyGrid for your Color property instead of the standard TextBox control. The control will probably be finished during the following 2-3 weeks. It works now for my Webpart solution in ASP.Net 1.x, but I need to do some changes for make it to work for ASP.Net 2.0.
    /Fredrik Normén - fredrikn @ twitter

    ASPInsider

    Microsoft MVP, MCSD, MCAD, MCT

    ASPInsiders
    My Blog
  • Re: Webpart properties' title?

    06-04-2004, 1:35 PM
    • Contributor
      4,557 point Contributor
    • mharder
    • Member since 11-22-2002, 12:03 PM
    • Redmond, WA
    • Posts 917
    • AspNetTeam
      Moderator
    In Beta2 we are adding the WebDisplayName attribute to control the name shown in the PropertyGridEditorPart. We are also adding the WebDescription attribute that will be shown as a tooltip in the property grid.
    http://blogs.msdn.com/mharder

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Webpart properties' title?

    06-04-2004, 1:50 PM
    • All-Star
      29,644 point All-Star
    • Fredrik N
    • Member since 06-22-2002, 1:03 AM
    • Sweden
    • Posts 5,334
    Great!
    /Fredrik Normén - fredrikn @ twitter

    ASPInsider

    Microsoft MVP, MCSD, MCAD, MCT

    ASPInsiders
    My Blog
Page 1 of 1 (4 items)