need advice with custom control and designer please

Discussion in 'ASP .Net Building Controls' started by andyjgw@gmail.com, May 11, 2005.

  1. Guest

    Hi

    I'm a bit new to the designing of custom web page controls and using
    them in the properties designer window - need a little advice on a
    concept here.

    I have two properties in my control - one that is a server name, which
    when entered will populate a drop-down list for the second property.

    I know that to get a drop-down list I will either need my second
    property to be an enum (in which case it will do it auto, but I can't
    cast my enum at design-time, it's derived from results querying
    property one), or use a custome TypeConverter.

    I have the documentation on this and have read Shawn Burke's "make your
    components really rad.." article, but my problem is I can't see how my
    custom typeconverter class will pick up the value from property one as
    I can't pass that value through in my property type definition:

    <Bindable(True), _
    TypeConverter(GetType(mytypeConverter)) << can't pass a param there?

    I can code the lookup no problem, but it's how to get property one
    value into the myTypeConverter class I'm having problems with.

    I guess it's a simple thing, that I'm just missing the concept of.
    After all, it's done in the designer when you pick a database and the
    list of tables is populated for example. Just can't see what I'm
    missing here...

    Thanks in advance for any advice - any code snippets/pointers showing
    how one property affects the values in another would be useful thanks
    :)

    AW
     
    , May 11, 2005
    #1
    1. Advertisements

  2. Guest

    Sorry, I should have mentioned that I've set
    RefreshProperties(RefreshProperties.All) on property one, but when
    debugging this I can see that when I change the value of property one,
    property two isn't re-calculated.

    Anything I'm missing here? It must be something pretty simple I
    think....

    Original post:
    I'm a bit new to the designing of custom web page controls and using
    them in the properties designer window - need a little advice on a
    concept here.

    I have two properties in my control - one that is a server name, which
    when entered will populate a drop-down list for the second property.

    I know that to get a drop-down list I will either need my second
    property to be an enum (in which case it will do it auto, but I can't
    cast my enum at design-time, it's derived from results querying
    property one), or use a custome TypeConverter.

    I have the documentation on this and have read Shawn Burke's "make your
    components really rad.." article, but my problem is I can't see how my
    custom typeconverter class will pick up the value from property one as
    I can't pass that value through in my property type definition:

    <Bindable(True), _
    TypeConverter(GetType(mytypeConverter)) << can't pass a param there?

    I can code the lookup no problem, but it's how to get property one
    value into the myTypeConverter class I'm having problems with.

    I guess it's a simple thing, that I'm just missing the concept of.
    After all, it's done in the designer when you pick a database and the
    list of tables is populated for example. Just can't see what I'm
    missing here...

    Thanks in advance for any advice - any code snippets/pointers showing
    how one property affects the values in another would be useful thanks
    :)
     
    , May 12, 2005
    #2
    1. Advertisements

  3. Guest

    Oops. Sorry, please dis-regard that last post. The re-calculation isn't
    the problem of course, it's the parameter-passing of the value of
    property1 to the TypeConverter of property2 that is causing me
    trouble...

    Don't know what I was thinking with that last one... :/
     
    , May 12, 2005
    #3
    1. Advertisements

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. Replies:
    2
    Views:
    432
    Kevin Spencer
    May 26, 2005
  2. Tim Meagher
    Replies:
    8
    Views:
    1,505
    Karl Seguin
    Jun 18, 2005
  3. KK
    Replies:
    2
    Views:
    1,070
    Big Brian
    Oct 14, 2003
  4. Matt Sokol
    Replies:
    2
    Views:
    631
    Theo Tillotson
    Aug 7, 2003
  5. Don
    Replies:
    1
    Views:
    262
    Andrew Backer
    Jul 19, 2005
  6. Tim Meagher

    Need reviews and advice on web and data control tools and vendors

    Tim Meagher, Jun 16, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    9
    Views:
    262
    Elton Bukri
    Jun 22, 2005
  7. Tim Meagher
    Replies:
    8
    Views:
    238
    Karl Seguin
    Jun 18, 2005
  8. Don
    Replies:
    1
    Views:
    271
    Andrew Backer
    Jul 19, 2005
Loading...