multi button compose buttongroup

4 posts, 0 answers
  1. fang
    fang avatar
    15 posts
    Member since:
    Apr 2013

    Posted 26 May 2013 Link to this post

    code below ,  how to use kendoui API  to  custom these buttons in listview  to make single select one from these, 
    <ul data-role="listview">
        <li class="btngroup">
            <a data-role="button" data-click="btnClick" class="scorebtn">10</a>
            <a data-role="button" data-click="btnClick" class="scorebtn">9</a>
            <a data-role="button" data-click="btnClick" class="scorebtn">8</a>
            <a data-role="button" data-click="btnClick" class="scorebtn">7</a>
            <a data-role="button" data-click="btnClick" class="scorebtn">6</a>
            <a data-role="button" data-click="btnClick" class="scorebtn">5</a>
            <a data-role="button" data-click="btnClick" class="scorebtn">4</a>
            <a data-role="button" data-click="btnClick" class="scorebtn">3</a>
            <a data-role="button" data-click="btnClick" class="scorebtn">2</a>
            <a data-role="button" data-click="btnClick" class="scorebtn">1</a>
        </li>
    </ul>
    1)button click event target is null ? why? use JQuery method below:
    $(".btngroup .scorebtn").on("click",function(e){
    console.log("btn click"+e.target);
    });
    e.target is null

    2) when click button btnClick function is not fire
    function btnClick(e){
        console.log("btnClick");
        console.log(this.element);
    }
  2. Petyo
    Admin
    Petyo avatar
    2438 posts

    Posted 29 May 2013 Link to this post

    Hello,

    If I understand you correctly, your requirements match the ButtonGroup widget - please check the respective demos

    Regards,
    Petyo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. fang
    fang avatar
    15 posts
    Member since:
    Apr 2013

    Posted 29 May 2013 Link to this post

    my requirements partically match the ButtonGroup widget, but the difference is i need space between buttons , now the  ButtonGroup widget not have
  5. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 31 May 2013 Link to this post

    Hello,

    In that case, you may consider using that widget, while customizing its looks with CSS. You may refer to
    this article (as well as our online demos) as a general guide on how to customize the widgets appearance.

    Regards,
    Alexander Valchev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready