Datalist in Dropdownbutton

2 posts, 0 answers
  1. OfficeHeart
    OfficeHeart avatar
    99 posts
    Member since:
    Aug 2008

    Posted 30 Aug 2010 Link to this post


    Is use a DataList with checkboxes in a radtoolbardropdown button. I have got some problems with accessing the checkboxes via javascript (client side). If one is checked the rest should unchecked and visa versa.


    <telerik:RadToolBar ID="RadToolBar1" runat="server" CssClass="toolbar" 
                    OnClientButtonClicking="OnCompanyToolbarClicking" Skin="Office2007">
                    <collapseanimation duration="200" type="OutQuint" />
                        <telerik:RadToolBarDropDown runat="server" Text="Categorieen" >
                        <telerik:RadToolBarButton runat="server" CssClass="customDDL" Value="CAT2">
                            <asp:DataList runat="server"  DataSourceID="odsCategorie" ID="DataList1">
                            <asp:CheckBox runat="server" ID="chk1" Checked="false" ValidationGroup='<%# Eval("id") %>' />  
                                    <asp:Label runat="server" ID="Label1" AssociatedControlID="chk1" Text='<%# Eval("categorie") %>' />
  2. Peter
    Peter avatar
    6637 posts

    Posted 31 Aug 2010 Link to this post

    Hello Martin,

    With your RadToolBar definition you can use the following jQuery code to access the checkboxes in the template:
    <script type="text/javascript">
           function pageLoad() {
               var $ = $telerik.$;
               $(".customDDL input:checkbox").attr('checked', true);

    All the best,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top