Custom command template

2 posts, 0 answers
  1. Aldo
    Aldo avatar
    40 posts
    Member since:
    Feb 2011

    Posted 01 Dec 2016 Link to this post

    Hi, i've a treelist with custom command, 

    and i'm trying to change the button template with the databound event like the Grid

    the visual result it's ok, but the event click doesn't fire, probably because i remove the k-button class.

    but if leave the class the button doesn't template.

    columns.Add().Command(command =>
                         command.Custom().ClassName("k-grid-EditCustom").Text(" ").Name("EditCustom").Click("editGroup");
                         command.Custom().ClassName("k-grid-DeleteCustom").Text(" ").Name("DeleteCustom").Click("deleteGroup");
    function treeGridGroup_DataBound(e) {
         e.sender.tbody.find(".k-grid-EditCustom").addClass("btn btn-warning btn-outline fa fa-pencil");
         e.sender.tbody.find(".k-grid-DeleteCustom").addClass("btn btn-danger btn-outline fa fa-trash-o m-l-5");
  2. Kostadin
    Kostadin avatar
    1733 posts

    Posted 05 Dec 2016 Link to this post

    Hi Aldo,

    Could you please let me know what changes you are trying to perform on the custom buttons? I am afraid you cannot remove the k-button class since its is used to wire up the click event of the button. However, you can add additional class to customize the appears of the button and use a CSS rule with higher specificity.

    Telerik by Progress
    Telerik UI for ASP.NET MVC is ready for Visual Studio 2017 RC! Learn more.
Back to Top