This is a migrated thread and some comments may be shown as answers.

How To fire Check box clicking event in Combobox

2 Answers 114 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
johnson lim
Top achievements
Rank 1
johnson lim asked on 11 Jan 2012, 07:21 AM
HI All,
I want to fire the checkbox clicking event in the Comboxbox to check what kind of checkbox has been selected by user. I need to disable controls on the screen based on the user selection. I have search online but find no solution on this. Does ayone has idea how to do this?
Below is my code
<ajax:RadComboBox ID="DdlPoCat" runat="server"
                         Width="280px"
                        EnableLoadOnDemand="True"
                        EnableVirtualScrolling="true"
                        EnableAutomaticLoadOnDemand="true" >
                        <ItemTemplate>                                       
                            <asp:CheckBox runat="server" ID="chkPoCat" Text='<%#Eval("ParamDesc")%>'/>
                        </ItemTemplate>                                                       
                   </ajax:RadComboBox>

dsPOCategory = getAppParam("PO_CAT")
          DdlPoCat.DataSource = dsPOCategory
          DdlPoCat.DataTextField = "ParamDesc"
          DdlPoCat.DataValueField = "ParamId"
          DdlPoCat.DataBind()
Help Please !!

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 11 Jan 2012, 08:39 AM
Hello,

Try attaching oncheckedchanged event of CheckBox as shown below.


ASPX:
<telerik:RadComboBox ID="RadComboBox2" runat="server" AllowCustomText="false" MarkFirstMatch="true">
   <ItemTemplate>
      <asp:CheckBox ID="chk" runat="server" oncheckedchanged="chk_CheckedChanged" AutoPostBack="true" Text='<%#Eval("FirstName")%>' />
  </ItemTemplate>
</telerik:RadComboBox>
C#:
protected void chk_CheckedChanged(object sender, EventArgs e)
   {
     //your code
   }

Thanks,
Princy.
0
johnson lim
Top achievements
Rank 1
answered on 11 Jan 2012, 09:35 AM
Thanks Princy. Love you so much ^^
Tags
ComboBox
Asked by
johnson lim
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
johnson lim
Top achievements
Rank 1
Share this question
or