Hello,
I want to use a simple HeaderTemplate for my ComboBox:
But I get this error when the pare is generated: Script controls may not be registered after PreRender. When I don't set the HeaderTemplate to the ComboBox, everything works as expected.
I want to use a simple HeaderTemplate for my ComboBox:
internal
class
MyHeaderTemplate : ITemplate
{
private
readonly
RadButton _okButton;
public
MyHeaderTemplate()
{
_okButton =
new
RadButton();
_okButton.ID =
"OkButton"
;
_okButton.Text =
"OK"
;
}
internal
RadButton ButtonOk
{
get
{
return
_okButton; }
}
public
void
InstantiateIn(Control container)
{
container.Controls.Add(_okButton);
}
}
But I get this error when the pare is generated: Script controls may not be registered after PreRender. When I don't set the HeaderTemplate to the ComboBox, everything works as expected.