I have combo added to every cell header of my grid to provide row filtering but I'm trying to load the data in the combo when it is clicked as per your sample:
http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/comboboxvsdropdownlist/defaultcs.aspx?skin=Sunset
but no data is requested as per your sample. If I type something in the combo, it does trigger the ItemsRequested event, but I would like to load data when the combo is clicked. The reason I don't want to preloaded (as it is currently done!) is that if a user never uses any of the filters, he/she should not have to be penalized having to wait additional time for these to be filled, queries to get this data should not be executed, etc...
This is the code I'm currently using:
RadComboBox comboBox = new RadComboBox();
comboBox.ID = GetFilterID(columnIndex);
comboBox.MarkFirstMatch = true;
comboBox.AutoPostBack = true;
comboBox.CssClass = "Filter";
comboBox.TextChanged += new EventHandler(comboBox_TextChanged);
comboBox.ShowDropDownOnTextboxClick = true;
comboBox.AppendDataBoundItems = true;
comboBox.EnableLoadOnDemand = true;
comboBox.DataTextField = filterableField.DataField;
comboBox.DataValueField = filterableField.DataField;
//comboBox.DataSource = GetFilterData(filterableField.DataField);
comboBox.ItemsRequested +=new RadComboBoxItemsRequestedEventHandler(comboBox_ItemsRequested);
comboBox.EnableVirtualScrolling = false;
comboBox.ShowMoreResultsBox = false;
comboBox.AllowCustomText = false;
headerCell.Controls.Add(comboBox);
private void comboBox_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
Debug.WriteLine(""); //Load additional data from here.
}
There is no html code as this is all done at run-time. Based on your sample as per link above, I can't spot any difference except that you have a RenderMode to "LightWeight" but I don't think that's the problem.
Any ideas?
Thanks.