Using CssStyleCollection (or Style class)

G

Gary K

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top