I have a combox with ShowMoreResults and LoadOnDemand Enabled:
<
telerik:RadComboBox ID="AccountIndustryTypeId" runat="server" DataTextField="TypeName" DataValueField="AccountIndustryTypeId" EnableLoadOnDemand="True" ShowMoreResultsBox="true" EnableVirtualScrolling="true" OnItemsRequested="AccountIndustryTypeId_ItemsRequested" MarkFirstMatch="True" Width="400">
</telerik:RadComboBox>
And and ItemsRequested event to retrieve some results :
protected
void AccountIndustryTypeId_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
{
DataTable types = AccountIndustryTypesDA.AccountIndustryTypesSelectList(e.Text, false);
((
RadComboBox) o).Items.Clear();
try
{
int itemOffset = e.NumberOfItems;
int endOffset = itemOffset + 15;
if (endOffset > types.Rows.Count)
{
endOffset = types.Rows.Count;
}
for (int i = itemOffset; i < endOffset; i++)
{
RadComboBoxItem item = new RadComboBoxItem(types.Rows[i]["TypeName"].ToString(), types.Rows[i]["AccountIndustryTypeId"].ToString());
((
RadComboBox)o).Items.Add(item);
}
e.Message = types.Rows.Count > 0 ?
String.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset.ToString(), types.Rows.Count.ToString()) : "No matches";
}
catch
{
e.Message =
"No matches";
}
}
When the ShowMoreResults image is clicked but no more results are actually retrieved the ShowMoreResults box is adding blank space. How can I stop this??