In my app I allow the users to choose a skin and it stores the choice in an application variable.
I am having trouble skinning the control in the edit form.
| Protected Sub rgTimeslips_ItemCommand(ByVal source As Object, ByVal e As GridCommandEventArgs) Handles rgTimeslips.ItemCommand |
| If (e.CommandName = RadGrid.EditCommandName) Then |
| e.Item.OwnerTableView.EditFormSettings.CaptionFormatString = "Edit Time Slip" |
| Dim frmitem As GridEditFormItem = DirectCast(e.Item, GridEditFormItem) |
| Dim ddlreason As RadComboBox = DirectCast(frmitem.FindControl("ddlReason1"), RadComboBox) |
| ddlreason.Skin = Application("TelerikTheme") |
| End If |
| End Sub |
I get an error that says:
Error Message: Unable to cast object of type 'Telerik.Web.UI.GridDataItem' to type 'Telerik.Web.UI.GridEditFormItem'.
Help please ?