Add Bootstrap style to button.

4 posts, 1 answers
  1. Jose Mejia
    Jose  Mejia avatar
    107 posts
    Member since:
    May 2009

    Posted 06 Feb 2014 Link to this post

    Hi.

    I want to add to button Bootstrap class='btn btn-primary', but whatever I tried it didn't help.
    I tried this:
    $(".k-button.k-upload-button").addClass("btn btn-primary");
    nothing help, then I tried use templates:
    <input name="files"  id="files" type="file"/>
    <script id="fileTemplate" type="text/x-kendo-template">
      <div>
         <button type='button' class='btn btn-primary' ></button>
    </div>
    </script>

    and use  template function, but no result.

    What I'm doing wrong? 

    Thanks in advance.


  2. Answer
    Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2595 posts

    Posted 07 Feb 2014 Link to this post

    Hi Jose,

    This scenario is not supported out-of-the-box and in order to achieve the same outcome as "btn btn-primary" for Kendo UI Upload button you should explicitly set the styles. As an example: 
    .k-button.k-upload-button {
       color:#fff;
       background-color:#428bca;
       border-color:#357ebd
    }

    Regards,
    Iliana Nikolova
    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. KEG
    KEG avatar
    3 posts
    Member since:
    Aug 2009

    Posted 14 Sep 2015 in reply to Iliana Nikolova Link to this post

    This is messed up.  This is one of the primary reasons I dislike the kendo UI/mvc libraries.  All properties should be able to be overwritten with site specific implementations, especially display aspects, i.e. css.
  5. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2595 posts

    Posted 16 Sep 2015 Link to this post

    Hi Keith,

    Unfortunately, there is no way to ensure integration compatibility with other third-party library styles and in some cases custom overrides are needed.

    Regards,
    Iliana Nikolova
    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