or
Protected Sub gridJourneys_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles gridJourneys.ItemCreated If TypeOf e.Item Is GridNoRecordsItem Then Dim norecordItem As GridNoRecordsItem = CType(gridJourneys.MasterTableView.GetItems(GridItemType.NoRecordsItem)(0), GridNoRecordsItem) Dim l As Label = norecordItem.FindControl("lblNoJourneys") l.Text = "hello" Throw New Exception("here") End If End Sub<NoRecordsTemplate>There are no journeys on this date. <asp:Label runat="server" ID="lblNoJourneys" /> </NoRecordsTemplate>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
Dimfd = NewTelerik.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)