Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
KendoUI Custom Command MVC
columns.Command(
command.Custom("Remove").Click("removeForm").Text("Approve")
command.Custom("Approve").Click("approveForm").Text("Approve");
)
//removeForm and approveForm are JavaScript functions
<script type="text/javascript">
function removeForm(e){
e.preventDefault();
var dataItem = this.dataItem($(e.currentTarget).closest("tr" ));
//At this point, dataItem is the representation of the form
//e.g. get access to the item's id via dataItem.id, or in my case
// form approval status e.g. dataItem.is_approved, etc.
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment