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

[Solved] Why ClientTemplate not working?

1 Answer 107 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Max
Top achievements
Rank 1
Max asked on 24 Jan 2012, 07:10 PM
hi all
Just trying to execute a javascript function the following way:
        columns.Command(commands =>
        {
            commands.Edit().ButtonType(buttonType);
            commands.Delete().ButtonType(buttonType);
        }).Width(100).Title("Commands");
        columns.Bound(p => p.ID).ClientTemplate("<a href='#' class='t-button order' onclick='return auditCustomCommand('<#= ID #>')'>Audit</a>").Width(30);
 
 
function auditCustomCommand(id) {
    alert(id);
}


Any ideas? Thank you

1 Answer, 1 is accepted

Sort by
0
Max
Top achievements
Rank 1
answered on 24 Jan 2012, 08:52 PM
Tags
Grid
Asked by
Max
Top achievements
Rank 1
Answers by
Max
Top achievements
Rank 1
Share this question
or