I need to create a RadFormDecorator on the fly and add it to my page.
The FormDecorator also needs to skip a few types of controls for which I am using the ControlsToSkip property.
My code is as shown below
Dim
fd =
New
Telerik.Web.UI.RadFormDecorator()
fd.ID =
"FormDecorator1"
fd.Skin =
CStr
(Session(
"SelectedSkin"
))
fd.DecoratedControls = Telerik.Web.UI.FormDecoratorDecoratedControls.All
fd.ControlsToSkip = FormDecoratorDecoratedControls.Textbox
fd.ControlsToSkip = FormDecoratorDecoratedControls.Label
Form.Controls.Add(fd)
Now when I do this the fd.ControlsToSkip is only as good as the last control that is assigned to it. In the above scenario, when the form decorator gets added to the form, the controlsToSkip only contains the Label and not the TextBox.
When creating a formdecorator using the html markup we can specify multiple controls to skip using comma separated values, I was wondering how it can be done programmatically as well?
Thanks