This is a migrated thread and some comments may be shown as answers.

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

1 Answer 46 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 05 May 2015, 02:59 PM

My Goal:

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

Problem:

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.

 

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 07 May 2015, 07:58 AM

Hello Simon,

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

Regards,
Dimiter Madjarov
Telerik
 

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

 
Tags
Grid
Asked by
Simon
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or