Using CssStyleCollection (or Style class)

Discussion in 'ASP .Net Web Controls' started by Gary K, Dec 8, 2004.

  1. Gary K

    Gary K Guest

    I am trying to code a new webcontrol that creates it's child controls on
    render based on the information in the class. What I would like to do is
    provide a method of specifying style similar to the DataGrid, (ItemStyle,
    EditItemStyle, etc), so the programmer can set the style of an item in my
    class without having to know in advance which type of control it is.
    I also realize that I could do this by having my webcontrol store other
    webcontrols, but this is a LOT of work & will add a HUGE performace lag to
    the control for a small result.
    I tried using the CssStyleCollection, but of course microsoft in their
    infinite (well, I can't measure it) wisdom have made this class unaccessible
    to programmers. I also tried using the Style class, but this does not provide
    me with the full style control I desire, (you can't use the 'display' tag for
    a start).
    Does anyone have any ideas on how I can workaround this dilly?
    I'm stumped. I'm just using string properties to specify the style class for
    my sub-items, but this is very messy and not good enough for the use of the
    control.
     
    Gary K, Dec 8, 2004
    #1
    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. Marri Suliez
    Replies:
    1
    Views:
    2,155
    Teemu Keiski
    Jan 23, 2004
  2. Arthur Mnev
    Replies:
    0
    Views:
    555
    Arthur Mnev
    Feb 2, 2004
  3. Shawn B.

    CssStyleCollection As Property

    Shawn B., Sep 9, 2003, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    256
    Shawn B.
    Sep 15, 2003
  4. Marri Suliez

    WebControl, CssStyleCollection and ViewState

    Marri Suliez, Jan 23, 2004, in forum: ASP .Net Building Controls
    Replies:
    4
    Views:
    137
    Teemu Keiski
    Jan 23, 2004
  5. Marri Suliez

    WebControl, CssStyleCollection and ViewState

    Marri Suliez, Jan 23, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    231
    Teemu Keiski
    Jan 23, 2004
Loading...

Share This Page