Grid - Templated element not executing "onclick" where command button works fine.

2 posts, 0 answers
  1. Simon
    Simon avatar
    2 posts
    Member since:
    Apr 2015

    Posted 05 May 2015 Link to this post

    My Goal:

    Put text on a command button in a grid row, and pop up a "details" window when clicked. 


    1) I can create a command button that works, but I am unsure the syntax to put my data custom text on the button.

    2) I can create a templated button that contains my text, but will not seem to execute my popup!

    I believe it's a problem with my syntax as I have just begun using this object. Here is a snippet of what I have:

    1) { command: { text: "!", name: "ShowAllDetails", click: showAdminDetails, title: "View Contact Details..." }, title: " ", width: "80px" } 

    2) { template: '<input type="button" id="ShowAdminDetail" onclick="showAdminDetails(dataItem);" class="k-button k-grid-CustomCommand" title="Show Admin Contact Info..." value="#= getButtonText(data) #" />' }


    Thanks in advance, I would like to get them BOTH working the same way so that I can better understand how these items function.


  2. Dimiter Madjarov
    Dimiter Madjarov avatar
    2311 posts

    Posted 07 May 2015 Link to this post

    Hello Simon,

    I covered the question in the support thread on the same topic. I hope the information helps.

    Dimiter Madjarov

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

Back to Top