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

multi button compose buttongroup

3 Answers 102 Views
Button (Mobile)
This is a migrated thread and some comments may be shown as answers.
fang
Top achievements
Rank 1
fang asked on 26 May 2013, 01:50 PM
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);
}

3 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 29 May 2013, 06:18 AM
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!
0
fang
Top achievements
Rank 1
answered on 30 May 2013, 12:24 AM
my requirements partically match the ButtonGroup widget, but the difference is i need space between buttons , now the  ButtonGroup widget not have
0
Alexander Valchev
Telerik team
answered on 31 May 2013, 03:57 PM
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!
Tags
Button (Mobile)
Asked by
fang
Top achievements
Rank 1
Answers by
Petyo
Telerik team
fang
Top achievements
Rank 1
Alexander Valchev
Telerik team
Share this question
or