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

command with template can't firing event!

1 Answer 70 Views
Grid
This is a migrated thread and some comments may be shown as answers.
xu
Top achievements
Rank 1
xu asked on 23 Apr 2014, 05:45 AM
                {
                    command: [{ name: "delete1", click: deleteItem }], title: " ", width: 100
                },
                {
                    command: [{ name: "delete2", click: deleteItem, template: "<div class='btn-link'><span class='glyphicon glyphicon-remove'></span></div>" }], title: "&nbsp;", width: 100
                }

​ function deleteItem(e) {
            var dataItem = this.dataItem($(e.currentTarget).closest("tr"));            if (confirm('are yousure : ' + dataItem.Name)) {
               ...
            }
        }

my problem is delete1 command work fine , but delete2 command can't firing the deleteItem event, any one can help me? thanks!

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 25 Apr 2014, 03:52 PM
Hello,

Can you send us the complete code with the event handler and the aspx page where we can see the CommandItem declaration?

Regards,
Pavlina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
xu
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or