Sign in to follow this  
ferr

[.net] ASP, User Controls, Collection Property

Recommended Posts

I'm trying to create a user control that has a DropDownList control within it. The problem is I can't find information on how to maintain the item collection property. I would like to be able to just click on the user control, see an "Items" property in the IDE with the ... button, then click the ... button to open a ListItemCollection Editor just as it would if it were a normal DDL. Any hints? edit: Similarly, what if I wanted to have a style builder with my UC? What I really want to get out of that is just the ability to easily modify the position to absolute, is there a way to do this programatically in the UC code? for style I've tried:
    public CssStyleCollection style
    {
        get
        {
            return this.style;
        }
    }


and I get the ... box like I want, but upon clicking it I get an error saying that the "Operation GetValue on the component did not succeed" [Edited by - ferr on August 14, 2007 1:38:32 PM]

Share this post


Link to post
Share on other sites
Maybe I should be more direct:

Say I want to create a User Control which is a modified DropDownList (modified in any fashion, or not modified at all, but none the less treated as a User Control). How would I go about letting my end user of this User Control make these modifications at design time via the IDE:

1) Edit the items in its collection
2) Edit its style

Surely someone has done something similar before or could at least give me a "that's impossible."

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this