E
Emanuele
Hi all,
i am developing a web custom control. Basically it's something like a
listbox, a bit enhanced. i have some problem when i have to add items to the
controls. this is the basic structure of the control:
CREATECHILDCONTROLS (method)
create the child controls of the component.
add the items inserted (if i don't add them here, i can't handle item
events)
RENDERCONTENTS
render the control and each item i have inserted.
---- IMPLEMENTATION IN A WEBFORM ---
the control is added in a Webform, and from a dorpdownlist the user can
choose which "set" of items explore. obviously, in the SELECTEDINDEXCHANGED
event of the dropdownlist i populate the custom control, but i can't see
anything.
i have found the problem: the items contained are not rendered because the
CREATECHILDCONTROLS is called before the SELECTEDINDEXCHANGED, thus i don't
have items added and created in the controls collection of the custom
control...
can anyone help me, please? i really don't know how to manage it...
i am developing a web custom control. Basically it's something like a
listbox, a bit enhanced. i have some problem when i have to add items to the
controls. this is the basic structure of the control:
CREATECHILDCONTROLS (method)
create the child controls of the component.
add the items inserted (if i don't add them here, i can't handle item
events)
RENDERCONTENTS
render the control and each item i have inserted.
---- IMPLEMENTATION IN A WEBFORM ---
the control is added in a Webform, and from a dorpdownlist the user can
choose which "set" of items explore. obviously, in the SELECTEDINDEXCHANGED
event of the dropdownlist i populate the custom control, but i can't see
anything.
i have found the problem: the items contained are not rendered because the
CREATECHILDCONTROLS is called before the SELECTEDINDEXCHANGED, thus i don't
have items added and created in the controls collection of the custom
control...
can anyone help me, please? i really don't know how to manage it...