how to write this in C#?

2 posts, 1 answers
  1. Bhuvan
    Bhuvan avatar
    50 posts
    Member since:
    Dec 2010

    Posted 09 Mar 2011 Link to this post

    how to write this staement in  $get(combo.get_id() + "_i" + i + "_chk_CheckLabel");  in C#
  2. Answer
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 09 Mar 2011 Link to this post

    Hello Bhuvan,

    I am not quite sure about your scenario and I suppose that you want to access the CheckBox control which is in side the ItemTemplate.
    Here is a sample which demonstrates the same.
    <telerik:RadComboBox ID="RadComboBox1" >
            <asp:CheckBox runat="server" ID="CheckBox1"  />
            <%# DataBinder.Eval(Container, "Text") %>
            <telerik:RadComboBoxItem Value="10/10/2010" Text="10/10/2010" />
            <telerik:RadComboBoxItem Value="10/3/2010" Text="10/3/2010" />
            <telerik:RadComboBoxItem Value="10/10/2010" Text="10/10/2010" />
            <telerik:RadComboBoxItem Text="Date1" IsSeparator="true" />

    protected void Button1_Click(object sender, EventArgs e)//accessing the checkboxes in a Button click
          foreach (RadComboBoxItem item in RadComboBox1.Items)
            CheckBox chk= (CheckBox)item.FindControl("CheckBox1");

Back to Top