I am trying to add a custom command on the toolbar which will call a JavaScript function in my view model. My HTML:
<div id="dependencyGrid" data-role="grid"
data-editable="inline"
data-toolbar="[{'command':[{'text':'+ Add New Record','click':'this.editApp','name':'Edit-App'}]}]",
data-bind="source: dependencies"
data-columns="[
{ command: ['edit', 'destroy'], width: 97},
{ field: 'SystemId', title: 'SystemId', width: 50, hidden: true },
{ field: 'DependentOnSystemId', title: 'Dependent On', width: 190 },
]">
</div>
But I get this error: "Uncaught Error: Custom commands should have name specified" even though I have specified a name. What is my error?