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

Radcombobox checkboxes validation

4 Answers 195 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
vinoth sansar
Top achievements
Rank 2
vinoth sansar asked on 20 Aug 2010, 12:27 PM
I need the validation for Radcombobox whether the check boxes are checked or not using customvalidator or other js validation. pls help urgently

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 20 Aug 2010, 01:06 PM
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.
0
vinoth sansar
Top achievements
Rank 2
answered on 23 Aug 2010, 11:37 AM
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> 
0
Accepted
Cori
Top achievements
Rank 2
answered on 23 Aug 2010, 05:22 PM
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.
0
vinoth sansar
Top achievements
Rank 2
answered on 24 Aug 2010, 08:05 AM
Thanks. Its work fine
Tags
ComboBox
Asked by
vinoth sansar
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
vinoth sansar
Top achievements
Rank 2
Cori
Top achievements
Rank 2
Share this question
or