<telerik:RadComboBox ID="ddlFolders" runat="server"> <Items> <telerik:RadComboBoxItem /> </Items> <ItemTemplate > <uc1:PhotoMove ID="PhotoMove1" PhotoID='<%# ((GridItem)Container).ItemIndex.ToString() %>' runat="server" /> </ItemTemplate> </telerik:RadComboBox>I am trying to load a user control inside the itemtemplate of a combobox. The combox is inside a radGrid. The user control needs the PhotoID:
'<%# ((GridItem)Container).ItemIndex.ToString() %>'However, this is not allowed and throws this error:
error CS0030: Cannot convert type 'Telerik.Web.UI.RadComboBoxItem' to 'Telerik.Web.UI.GridItem' ---> System.Web.HttpParseException:
What is an alternative way to pass a dynamic id to a nested user control that is inside a combobox which is inside a radgrid?
Thanks!