Toggle Button from Button

7 posts, 0 answers
  1. Dr.YSG
    Dr.YSG avatar
    210 posts
    Member since:
    Dec 2009

    Posted 05 Dec 2013 Link to this post

    I am trying to create something similiar to the Kindle Download page: https://read.amazon.com/, It has two buttons at the top: [CLOUD] [DOWNLOADED]

    Each button can be in either a selected or non-selected state. There is always one selected (so they work as a radio button pair).

    The color of the button indicates whether it is selected or not.

    I like the way your CSS (MetroBlack) displays the button for button.k-state-focused, but my guess is you use that automatically, so if I click somewhere else it would lose that decoration. 

    Is there a way I can put decoration on the button and have it "sticky" until I click it's pair (I would implement the radio button state logic in javascript), unless there is a brilliant way to do this in css!




  2. Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 09 Dec 2013 Link to this post

    Hello Yechezkal,

    Since the Button currently does not provide toggle behavior, you can manually apply CSS classes or inline styles to achieve the same behavior. The widget's click event can help you.

    Regards,
    Dimo
    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. Sean
    Sean avatar
    15 posts
    Member since:
    Sep 2013

    Posted 03 Jan 2014 Link to this post

    Adding this functionality would be well received I'm sure. I've been looking around for a control to give my UI a yes/no toggle option and the button was my first thought.
    Thanks,
    Todd
  5. Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 03 Jan 2014 Link to this post

    Hello Todd,

    You can vote for this feature at http://feedback.kendoui.com/

    Regards,
    Dimo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Sean
    Sean avatar
    15 posts
    Member since:
    Sep 2013

    Posted 03 Jan 2014 Link to this post

    Thanks, I was able to find the Toggle Button vote: http://feedback.kendoui.com/forums/127393-kendo-ui-feedback/suggestions/2354861-toggle-style-buttons-ui-elements . I'm hoping 2014 brings the Kendo Web control sets up to par with the ASP.NET suite, as I've had some great experiences integrating the selection available.
    Happy New Year,
    Todd
  7. Paolo
    Paolo avatar
    423 posts
    Member since:
    Jun 2009

    Posted 03 Sep 2014 Link to this post

    Hello Dimo, could you please indicate which classes are necessary to make the button looking like in the "pressed" or "toggle" state?
  8. Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 03 Sep 2014 Link to this post

    Hello Paolo,

    You can use the k-state-active CSS class.

    Regards,
    Dimo
    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