Property Greyed Out in VS

Discussion in 'ASP .Net Building Controls' started by jcteague@gmail.com, Nov 9, 2005.

  1. Guest

    I have a Server Control that inherits from DataGrid. I've added an
    object type property called DataMethodParameter, but this property is
    greyed out in the properties list in Visual Studio.

    private object dataMethodParameter = null;

    [Category("Data"),
    Description("Parameter to Pass to the selected OrdersProvider Method")]
    public object DataMethodParameter
    {
    get{return this.dataMethodParameter;}
    set{this.dataMethodParameter = value;}
    }

    Any suggestions?
     
    , Nov 9, 2005
    #1
    1. Advertising

  2. Brock Allen Guest

    The datatype is object. If it were int or string then VS.NET would be able
    to parse it and know what to expect.

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen

    > I have a Server Control that inherits from DataGrid. I've added an
    > object type property called DataMethodParameter, but this property is
    > greyed out in the properties list in Visual Studio.
    >
    > private object dataMethodParameter = null;
    >
    > [Category("Data"),
    > Description("Parameter to Pass to the selected OrdersProvider
    > Method")]
    > public object DataMethodParameter
    > {
    > get{return this.dataMethodParameter;}
    > set{this.dataMethodParameter = value;}
    > }
    > Any suggestions?
    >
     
    Brock Allen, Nov 9, 2005
    #2
    1. Advertising

  3. Guest

    Well, that poses a problem. The datatype could be practically
    anything. I am casting it in the code based on other parameters. Any
    suggestions on how I could do this other than making it a string and
    using Convert. That could pose some problems as well.
     
    , Nov 9, 2005
    #3
  4. Brock Allen Guest

    What is it supposed to represent? If it can be almost anything, then wouldn't
    that mean it'd have to be set at runtime? I mean, anything could be an Int32,
    a System.Drawing.Color, or a System.Xml.XmlDocument, right?

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen

    > Well, that poses a problem. The datatype could be practically
    > anything. I am casting it in the code based on other parameters. Any
    > suggestions on how I could do this other than making it a string and
    > using Convert. That could pose some problems as well.
    >
     
    Brock Allen, Nov 9, 2005
    #4
  5. Guest

    Yes and No.
    This is a CodeSmith template to work with the NetTiers project. I am
    generating Custom DataGrids for their providers. Based on which
    provider method the choose I can cast appropriately. They have a
    built-in method for getting the right type. I think this just means I
    have a little more work.

    Thanks
     
    , Nov 9, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. murdo[nospam]
    Replies:
    0
    Views:
    879
    murdo[nospam]
    Dec 16, 2003
  2. John H

    ToolBox Greyed Out

    John H, Jul 21, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    620
    John H
    Jul 21, 2004
  3. Replies:
    2
    Views:
    593
  4. PeterKellner

    Problem Getting Custom Control to show not greyed out in toolbox

    PeterKellner, May 23, 2006, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    178
    PeterKellner
    May 23, 2006
  5. Tara Keane

    sciTE-Go option greyed out

    Tara Keane, Oct 21, 2010, in forum: Ruby
    Replies:
    1
    Views:
    218
    Quintus
    Oct 21, 2010
Loading...

Share This Page