I have 2 combo box's on my page using Load on Demand from Webservices which are working great, but I'm trying to enable "MarkFirstMatch", but if I do that the item isn't being selected, but just the text value is being set.
(if they key down to the value, or select with the mouse it works fine, just not when using mark first).
Result
Selectedindex = -1
SelecteItem = Nothing
Selected Value = ""
text = marked FirstMatch.
While I think i could do a work around and do a reverse lookup if value = "' and text = something, I would like to get it working so I can just reference the selectedvalue.
Thanks in advance for any help you can give.
Combo:
WebService:
(if they key down to the value, or select with the mouse it works fine, just not when using mark first).
Result
Selectedindex = -1
SelecteItem = Nothing
Selected Value = ""
text = marked FirstMatch.
While I think i could do a work around and do a reverse lookup if value = "' and text = something, I would like to get it working so I can just reference the selectedvalue.
Thanks in advance for any help you can give.
Combo:
<telerik:RadComboBox ID="rcbInitiated" runat="server" DataTextField="userName" MarkFirstMatch="true" DataValueField="eID" EnableLoadOnDemand="true" EnableAutomaticLoadOnDemand="true" ShowMoreResultsBox="false" EnableVirtualScrolling="false" OnClientDropDownClosed="OnClientDropDownClosed" EnableItemCaching="true"> <CollapseAnimation Duration="200" Type="OutQuint" /> <WebServiceSettings Path="~/ws/wsCFR.asmx" Method="GetEIDUserName" /> </telerik:RadComboBox>WebService:
<WebMethod()> _ Public Function GetUserIDUserName(ByVal context As RadComboBoxContext) As RadComboBoxData Return GetItems(context, "userID") End FunctionPublic Function GetItems(ByVal context As RadComboBoxContext, ByVal valueField As String) As RadComboBoxData Dim data As DataTable = GetData(context.Text) Dim comboData As New RadComboBoxData() Dim itemOffset As Integer = context.NumberOfItems Dim endOffset As Integer = Math.Min(itemOffset + ItemsPerRequest, data.Rows.Count) comboData.EndOfItems = endOffset = data.Rows.Count Dim result As New List(Of RadComboBoxItemData)(endOffset - itemOffset) For i As Integer = itemOffset To endOffset - 1 Dim itemData As New RadComboBoxItemData() itemData.Text = data.Rows(i)("userName").ToString() itemData.Value = data.Rows(i)(valueField).ToString() result.Add(itemData) Next comboData.Message = GetStatusMessage(endOffset, data.Rows.Count) comboData.Items = result.ToArray() Return comboData End Function