Jquery KendoUI命令与KendoUI网格的模板问题
我正在使用kendoUI web,而且是新手。我在下面的代码中遇到了一个问题Jquery KendoUI命令与KendoUI网格的模板问题,jquery,json,jquery-ui,kendo-ui,kendo-grid,Jquery,Json,Jquery Ui,Kendo Ui,Kendo Grid,我正在使用kendoUI web,而且是新手。我在下面的代码中遇到了一个问题 columns:[ { command:"edit", template:"<a href ='index_code.html' > #=edit# </a>", width: "80px", }, { field: 'edit', template: '<a href="index_code.html"&am
columns:[
{
command:"edit",
template:"<a href ='index_code.html' > #=edit# </a>",
width: "80px",
},
{
field: 'edit',
template: '<a href="index_code.html"> #=edit# </a>'
}]
当我单击field edit列时,它会将页面转移到index_code.html
但这不会发生在命令编辑列上,它不会执行任何操作
如何激活命令按钮???不确定您想要实现什么,但:
命令时
不能使用模板
命令时
希望每个按钮
都有相同的文本template
例如:
columns : [
{
field: 'edit',
template: '<a href="index_code.html" class="k-button k-button-icontext"><span class="k-icon k-edit"></span>#= City #</a>',
width: 100
}
]
列:[
{
字段:“编辑”,
模板:“”,
宽度:100
}
]
jshiddle here:像这样尝试
columns:[
{
command: "edit",
width : 100
},
{
field: 'edit',
template: '<a href="index_code.html" class="k-button k-button-icontext"><span class="k-icon k-edit"></span>#= City #</a>',
width: 100
}]
请参见此处的演示:
$('.k-grid-edit').on("click", function () {
alert('hi');
});