I
Iain
I have a kind of hierachical templated list class where my templates are
set for each datatype that is in the list (well, kind of tree, I suppose).
In this case my data wants to be represented by a radio button which is
contained in a template.
Of course I want all radio buttons at a given level of the tree to be in
the same group.
This fails because they are each in their own naming container.
I guess I could create a COntainer control which did not derive from
INamingContainer (so the parent would provide the prefix to the GroupName
which is what I want), however, I may want to have elements underneath the
radiobutton which should be separately named from each other (so the naming
container needs to be at the level of the button).
My remaining two options (that I've thought of so far) are.
Create a custom control which acts (more or less) like a radiobutton but
handles groupnames better (er more flexibily) and have the use put that in
the template.
Do much as above, but allow the template to contain a normal asp Readio
Button and after calling InstantiateIn, automatically replace the
RadioButton in the controls collection with a custom control with the
approapriate rendering characteristics.
Both seem a hell of a lot of work for something simple!
I was hoping for a way round this (like an event that I can use to override
the the GRoupName on rendering.
Any ideas?
Iain
set for each datatype that is in the list (well, kind of tree, I suppose).
In this case my data wants to be represented by a radio button which is
contained in a template.
Of course I want all radio buttons at a given level of the tree to be in
the same group.
This fails because they are each in their own naming container.
I guess I could create a COntainer control which did not derive from
INamingContainer (so the parent would provide the prefix to the GroupName
which is what I want), however, I may want to have elements underneath the
radiobutton which should be separately named from each other (so the naming
container needs to be at the level of the button).
My remaining two options (that I've thought of so far) are.
Create a custom control which acts (more or less) like a radiobutton but
handles groupnames better (er more flexibily) and have the use put that in
the template.
Do much as above, but allow the template to contain a normal asp Readio
Button and after calling InstantiateIn, automatically replace the
RadioButton in the controls collection with a custom control with the
approapriate rendering characteristics.
Both seem a hell of a lot of work for something simple!
I was hoping for a way round this (like an event that I can use to override
the the GRoupName on rendering.
Any ideas?
Iain