another problem is that when postback to ComboBox_ItemsRequested, OnPreRender is not called & i dont see the radgrid inside the drop down area of the combobox.
i suppose those three porblems are related.
here is the code:
public
class BOBComboBox : CompositeControl {
RadComboBox ComboBox;
protected override void CreateChildControls()
{
ComboBox =
new RadComboBox();
ComboBox.ItemsRequested +=
new RadComboBoxItemsRequestedEventHandler(ComboBox_ItemsRequested);
ComboBox.EnableLoadOnDemand =
true;
Controls.Add(ComboBox);
base.CreateChildControls();
}
void ComboBox_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
{
RadGrid RadGrid = new RadGrid();
RadComboBoxItem RadComboBoxItem = new RadComboBoxItem();
RadComboBoxItem.Controls.Add(RadGrid);
ComboBox.Items.Add(RadComboBoxItem);
}
protected override void OnPreRender(EventArgs e)
{
if (ComboBox != null)
{
RadAjaxManager manager = RadAjaxManager.GetCurrent(this.Page);
manager.AjaxSettings.AddAjaxSetting(ComboBox, ComboBox);
}
base.OnPreRender(e);
}
}