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

Custom Command not working

0 Answers 40 Views
Grid
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 27 Aug 2012, 08:50 PM
I have seen several posts on this but I haven't found a solution.

My grid has a custom command that points to a javascript function:

$("#history_grid").kendoGrid({
columns: [
{ field: "type", title: "Document Type" },
{ field: "entity", title: "To/From" },
{ field: "date_received", title: "Date Sent/Received" },
{ field: "path", title: " ", template: '<a href="${ path }">Link to file</a>', width: "80px" },
{ command: { name: "ViewFile", text: "ViewFile", click: viewDoc }, title: " ", width: "100px" }
],
scrollable: true,
autobind: false,
dataSource: history_datasource
});
 
function viewDoc(e) {
e.preventDefault();
alert("Hello, world!");
};

Clicking the custom command button does nothing.
Help?

No answers yet. Maybe you can help?

Tags
Grid
Asked by
David
Top achievements
Rank 1
Share this question
or