I noted in another thread that the"SelectOnTab" functionality is enabled by default in the new control. This is not working for me for load on demand. The user can enter text but tabbing out of the control does not force a selection.
Control:
>
LoadOnDemand handler:
Any help is appreciated!
Control:
<telerik:RadComboBox ID="userRadComboBox" runat="server" EnableLoadOnDemand="True" |
ShowMoreResultsBox="True" Skin="Outlook" OnItemsRequested="userRadComboBox_ItemsRequested" |
Width="250px"> |
<CollapseAnimation Duration="200" Type="OutQuint" /> |
</telerik:RadComboBox> |
LoadOnDemand handler:
protected void userRadComboBox_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e) |
{ |
RadComboBox userRadComboBox = o as RadComboBox; |
userRadComboBox.Items.Clear(); |
string text = e.Text; |
try |
{ |
// Bind User names |
RPFirehouseUserCollection coll = new RPFirehouseUserCollection(); |
coll.Query.FhuStaffId.Trim(); |
coll.Query.Where(coll.Query.FhuStaffId != String.Empty); |
coll.Query.Where(coll.Query.FhuStaffId.Like(text + "%")); |
coll.Query.OrderBy(coll.Query.FhuStaffId.Ascending); |
if (coll.Query.Load()) |
{ |
int itemsPerRequest = 20; |
int itemOffset = e.NumberOfItems; |
int endOffset = itemOffset + itemsPerRequest; |
if (endOffset > coll.Count) |
{ |
endOffset = coll.Count; |
} |
for (int i = itemOffset; i < endOffset; i++) |
{ |
RPFirehouseUser user = coll[i]; |
/// Changed from FhuName to FhuUserId 5/6/08 JCK |
userRadComboBox.Items.Add(new RadComboBoxItem(user.FhuStaffId + " " + user.FhuName, user.FhuId.ToString())); |
} |
if (coll.Count > 0) |
{ |
e.Message = String.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset.ToString(), coll.Count.ToString()); |
} |
else |
{ |
e.Message = "No matches"; |
} |
} |
} |
catch (Exception ex) |
{ |
e.Message = "No matches"; |
} |
} |
Any help is appreciated!