Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

How to remove class "k-button" and add classes from bootstrap like "btn btn-danger" ?

$
0
0

Hello Ahmed,

I would like to apologize for the misunderstanding in our communication. It is my fault.  

The code snippet for removing the "k-button" class should be executed in the grid dataBound event handler. At this moment the grid is bound and the jQuery selector will return the correct result, otherwise the result will be empty.

Please refer to this code snippet:

 

@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.ProductViewModel>()
    .Name("grid")
    .AutoBind(false)
    .Columns(columns =>
    {
       //removed for brevity
    })
    .Events(e => e.DataBound("dataBoundHandler"))

function dataBoundHandler() {
        $(".btn-success").removeClass("k-button");
        $(".btn-danger").removeClass("k-button");
    }


Regards,
Boyan Dimitrov
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 

Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>