Respected Sir/Madam,
I need to show checkboxes in one ComboBox. Now I want Server Side postback event, when user selects all desired checkboxes and clicks outside of ComboBox to close the ComboBox window. Is it possible? Currently SelectedIndexChanged is not working in this case.
ASPX code:
<telerik:RadComboBox runat="server" ID="ddlPopulation" OnSelectedIndexChanged ="ddlPopulation_SelectedIndexChanged"
OnItemDataBound="ddlPopulation_ItemDataBound" AllowCustomText="false" AutoPostBack="true" >
<ItemTemplate>
<asp:CheckBox runat="server" ID="chk" />
</ItemTemplate>
</telerik:RadComboBox>
C# code
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
PopulatePopulation();
}
}
private void PopulatePopulation()
{
ddlPopulation.DataSource = Job.GetPopulations();
ddlPopulation.DataTextField = "PopulationName";
ddlPopulation.DataValueField = "PopulationID";
ddlPopulation.DataBind();
}
protected void ddlPopulation_ItemDataBound(object sender, Telerik.Web.UI.RadComboBoxItemEventArgs e)
{
CheckBox chk = e.Item.FindControl("chk") as CheckBox;
chk.Text = e.Item.Text;
}
protected void ddlPopulation_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
//TODO: do some work
}
Please help me how can I get server side event. On this Event I need to populate one another ComboBox.
Thanks
Paresh
I need to show checkboxes in one ComboBox. Now I want Server Side postback event, when user selects all desired checkboxes and clicks outside of ComboBox to close the ComboBox window. Is it possible? Currently SelectedIndexChanged is not working in this case.
ASPX code:
<telerik:RadComboBox runat="server" ID="ddlPopulation" OnSelectedIndexChanged ="ddlPopulation_SelectedIndexChanged"
OnItemDataBound="ddlPopulation_ItemDataBound" AllowCustomText="false" AutoPostBack="true" >
<ItemTemplate>
<asp:CheckBox runat="server" ID="chk" />
</ItemTemplate>
</telerik:RadComboBox>
C# code
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
PopulatePopulation();
}
}
private void PopulatePopulation()
{
ddlPopulation.DataSource = Job.GetPopulations();
ddlPopulation.DataTextField = "PopulationName";
ddlPopulation.DataValueField = "PopulationID";
ddlPopulation.DataBind();
}
protected void ddlPopulation_ItemDataBound(object sender, Telerik.Web.UI.RadComboBoxItemEventArgs e)
{
CheckBox chk = e.Item.FindControl("chk") as CheckBox;
chk.Text = e.Item.Text;
}
protected void ddlPopulation_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
//TODO: do some work
}
Please help me how can I get server side event. On this Event I need to populate one another ComboBox.
Thanks
Paresh