1

I have a RadComboBox with the checkboxes for Multiselction. I want to have a postback for the ItemChecked event.

The combobox also is generating a postback on closing of the dropdown which I do not want. How can I prevent this to happen.

<telerik:RadComboBox RenderMode="Lightweight" ID="RadComboBox1" runat="server" CheckBoxes="true" EnableCheckAllItemsCheckBox="true" CssClass="modaldropdown" ZIndex="99999999"
  Width="600px" Label="Select book genres:" OnDataBound="RadComboBox1_DataBound" OnItemChecked="RadComboBox1_ItemChecked" AutoPostBack="true">

 <ItemTemplate>
      <ul>
           <li>
               <strong>Name:&nbsp;&nbsp;&nbsp;</strong>
               <%# DataBinder.Eval(Container.DataItem, "Name")%>
           </li>
           <li>
               <strong>Email:&nbsp;&nbsp;&nbsp;</strong>
               <%# DataBinder.Eval(Container.DataItem, "Email")%>
           </li>
           <li>
                <strong>Department:&nbsp;&nbsp;&nbsp;</strong>
                <%# DataBinder.Eval(Container.DataItem, "DepartmentName")%>
           </li>
            <li>
                 <strong>Division:&nbsp;&nbsp;&nbsp;</strong>
                 <%# DataBinder.Eval(Container.DataItem, "DivisionName")%>
            </li>
        </ul>
 </ItemTemplate>

c# CodeBehind

protected void RadComboBox1_ItemChecked(object sender, RadComboBoxItemEventArgs e)
{
        string r = e.Item.Text;
        string rw = e.Item.Value;
}
Rohil Patel
  • 235
  • 2
  • 4
  • 16

0 Answers0