|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Custom dropdownlist that displays a listboxThis is driving me crazy, I am trying to build a custom dropdownlist that when
rendered also displays a listbox next to it. I am going to use the listbox as a repository for items that are selected when accessing the dropdown. I did override CreateControlCollection() and returned "new ControlCollection(this);". However when I add controls (by overriding CreateChildControls()) I do not see them on the webpage. Is there any other magic that needs to be done? I have created other custom controls without a problem. Any information would be greatly appreciated!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Thanks, Peter Peter S. schrieb:
> This is driving me crazy, I am trying to build a custom dropdownlist that when Then it is not a custom DropdownList but a composite control. You should> rendered also displays a listbox next to it. probably better try to create a custom control that contains both the dropdown- and the listbox. Jan I would like the base clase to be a dropdownlist so that I can invoke the
class in my webpage and dynamically set the list items. I could have multiple dropdowns in my page and would like to set the items in my page rather than programatically. The question is,is this possible and if so what do I need to know to make it work???? -Peter Show quoteHide quote "Jan Peter Stotz" wrote: > Peter S. schrieb: > > > This is driving me crazy, I am trying to build a custom dropdownlist that when > > rendered also displays a listbox next to it. > > Then it is not a custom DropdownList but a composite control. You should > probably better try to create a custom control that contains both the > dropdown- and the listbox. > > Jan > Peter S. schrieb:
> I would like the base clase to be a dropdownlist so that I can invoke the I don't see any problem to create a composite control that implements the> class in my webpage and dynamically set the list items. same interface as the DropdownList class or do you need polymorph inheritance? Jan I *have* created a composite control that implements the DropDownList.
The problem is when I try to display a listbox beside it by overriding the CreateChildControls() method. Is that possible???? Show quoteHide quote "Jan Peter Stotz" wrote: > Peter S. schrieb: > > > I would like the base clase to be a dropdownlist so that I can invoke the > > class in my webpage and dynamically set the list items. > > I don't see any problem to create a composite control that implements the > same interface as the DropdownList class or do you need polymorph > inheritance? > > Jan >
Simple question ???
Using DataList - table and headers DataItem in DataListItem is null. How to build dynamicaly a menu in ASP.Net 2.0 (VS 2005) ? Output the HTML contents of a dynamically created control Picture on a button DHTML MENU problem in IE Anybody using Table control? How Do I Use a CheckBox to Update a Bit Type Data Field in a DataGrid Size of an Iframe displaying image |
|||||||||||||||||||||||