This is a migrated thread and some comments may be shown as answers.

RadComboBox inside custom control

1 Answer 64 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 21 Feb 2011, 12:56 PM
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

1 Answer, 1 is accepted

Sort by
0
Jon
Top achievements
Rank 1
answered on 21 Feb 2011, 01:14 PM
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)
Tags
ComboBox
Asked by
Jon
Top achievements
Rank 1
Answers by
Jon
Top achievements
Rank 1
Share this question
or