This is a migrated thread and some comments may be shown as answers.
RadComboBox with check all option progamatically
1 Answer 63 Views
This is a migrated thread and some comments may be shown as answers.
Rev
Top achievements
Rank 1
Rev asked on 29 Apr 2013, 05:55 AM
Hi all,

I created RadCombox with  <headerTemplate> and <ItemTemplate>.
Now I need to select all items by selecting "Check All" option .
Can anyone tell how to add "check all" option for this.
Note: I tried with EnableCheckAllItemsCheckBox="true" ,but it is not selecting all items .

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 02 May 2013, 07:10 AM
Hi Rev,

 
Since you are using item templates you will have to use your custom code to check or uncheck all the checkboxes. Here is a sample code how such behavior can be achieved:

<script>
         function OnClientClicked(sender, args) {
          
             $telerik.$(".rcbSlide input:checkbox").attr("checked", "checked");
         }
     </script>
     <telerik:RadButton runat="server" ID="Rb1" AutoPostBack="false" OnClientClicked="OnClientClicked"></telerik:RadButton>
 <div>
     <telerik:RadComboBox ID="RadComboBox1" runat="server"
          AutoPostBack="true" 
       >
         <HeaderTemplate></HeaderTemplate>
         <ItemTemplate>
             <asp:CheckBox runat="server" />
         </ItemTemplate>

Hope this will be helpful.Greetings,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Asked by
Rev
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or