RadComboBox inside custom control

2 posts, 0 answers
  1. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 21 Feb 2011 Link to this post

    Hi,

    I'm using a radcombobox inside a custom control.  I need to be able to optionally tie it to a onitemsrequested serverside function for use with some cascading drop downs.  The problem that I am finding is that there is no onitemsrequested field available on the server side so I can't set it on the control.

    How would I go about working around this issue?

    Tired and probably missing something obvious!

    Regards,

    Jon
  2. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 21 Feb 2011 Link to this post

    OK so tiredness abated a little and I now think I have it working albeit with a few tweaks needed.  For anyone else with similar brain fog here is what I did...

    ' inside custom control class
        Private _onitemsrequested As Telerik.Web.UI.RadComboBoxItemsRequestedEventHandler = Nothing
        Public Property OnItemsRequested() As Telerik.Web.UI.RadComboBoxItemsRequestedEventHandler
            Get
                Return _onitemsrequested
            End Get
            Set(ByVal value As Telerik.Web.UI.RadComboBoxItemsRequestedEventHandler)
                _onitemsrequested = value
            End Set
        End Property
     
    ' Inside page load of custom control class
    If _onitemsrequested <> Nothing Then
        AddHandler Me.CB1.ItemsRequested, _onitemsrequested
    End If
     
    ' Inside of form page load event
    DirectCast(uxFormView.FindControl("uxClientQualityControllerIDs"), ComboCheckbox).OnItemsRequested = CType(AddressOf uxClientQualityControllerIDs_ItemsRequested, Telerik.Web.UI.RadComboBoxItemsRequestedEventHandler)
Back to Top