Radcombobox checkboxes validation

5 posts, 1 answers
  1. vinoth sansar
    vinoth sansar avatar
    33 posts
    Member since:
    May 2010

    Posted 20 Aug 2010 Link to this post

    I need the validation for Radcombobox whether the check boxes are checked or not using customvalidator or other js validation. pls help urgently
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 20 Aug 2010 Link to this post

    Hello,


    You can iterate through the checkboxes from client-side in the validation method. Here is the documentation on how to do it.
    Finding an item in template



    Thanks,
    Princy.
  3. vinoth sansar
    vinoth sansar avatar
    33 posts
    Member since:
    May 2010

    Posted 23 Aug 2010 Link to this post

    Thanks for your reply, that links show for radtree, i dont know how to implement that code with check box. Below the aspx code is below that am using. I need validation whether the checkbox or checked or not. pls help me out

    ASPX code:
    <telerik:RadComboBox  Height="150px" runat="server"  ID="radcomboApprovers"
                    AllowCustomText="true" Width="200px" OnClientDropDownClosed="onDropDownClosing"
                   Text="--Select--" Filter="StartsWith" >
                                           <ItemTemplate>
                                           <div onclick="StopPropagation(event)" >
                                               <asp:CheckBox ID="chkApprovers" runat="server" onclick="onCheckApprovers(this);"
                                                    />
                                                    <asp:Label runat="server" ID="Label1" AssociatedControlID="chkApprovers">
                                       <%# Eval("FIRSTNAME")%>
                                    </asp:Label>
                                                   </div>
                                           </ItemTemplate>
                                           <CollapseAnimation Type="None" />
                 </telerik:RadComboBox> 
  4. Answer
    Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 23 Aug 2010 Link to this post

    It's done the same way. Instead of looking for RadTreeView1, you look for chkApprovers. Like so:

    var combo = $find("<%= RadComboBox1.ClientID %>");
    var checkbox = combo.get_items().getItem(0).findControl("chkApprovers");
    checkbox.checked;

    You just then place that in a loop and check if checked is true.

    I hope that helps.
  5. vinoth sansar
    vinoth sansar avatar
    33 posts
    Member since:
    May 2010

    Posted 24 Aug 2010 Link to this post

    Thanks. Its work fine
Back to Top