Here is my code:
<telerik:RadComboBox ID="ddlServicesRequested" runat="server" DataValueField="Value" DataTextField="Text" Skin="Vista" OnClientSelectedIndexChanging="setQtyReq"></telerik:RadComboBox>
function setQtyReq(combo, eventArgs) {
var Combo = $find("<%= ddlServicesRequested.ClientID %>");
var index= eventArgs.get_item().get_index();
}
Me.ddlServicesRequested.Items.Insert(0, New RadComboBoxItem("-- Select One --", "0"))
Dim dt1 As DataTable = GetDataTable("myStoredProcedure")
For Each dr As DataRow In dt1.Rows
Dim rcbi As New RadComboBoxItem()
rcbi.Text = dr("Text")
rcbi.Value = dr("Value")
rcbi.Attributes("Min") = dr("MinQty")
rcbi.Attributes("Max") = dr("MaxQty")
Me.ddlServicesRequested.Items.Add(rcbi)
Next
Here I have the radcombobox that is being populated with two custom attributes, Min and Max. When the user selects an item the setQtyReq javascript function get called and I am able to get the radcombobox and the index of the selected item. My problem I am having is that I can’t figure out a way to get the values of the custom attributes. How can I get the values of the custom attributes?
Finally figured out how to do it: