Hi,
I have a page that uses a user control that contains a telerik:RadGrid which uses another control for edit that contains a radcombo. I enabled load on demand and everything works fine withone exception. The when typing it doesn't call load on demand only when I scoll down and does not filter based on what the user enteres. Here is the code that is behind the Edit Control.
protected void RadComboBox1_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
IEnumerable<Client> clients = BizLayer.Instance().ClientsGetAllUnfiltered();
var AllClients = from c in clients where c.ClientName.Contains(e.Text) select c;
int itemOffset = e.NumberOfItems;
int endOffset = Math.Min(itemOffset + ItemsPerRequest, AllClients.Count());
e.EndOfItems = endOffset == AllClients.Count();
var filter = AllClients.Skip(itemOffset).Take(ItemsPerRequest);
foreach (Domain.Client c in filter)
{
RadComboBox1.Items.Add(new RadComboBoxItem(c.ClientName.ToString(), c.ClientId.ToString()));
}
e.Message = GetStatusMessage(endOffset, AllClients.Count());
}
Thank you.