【发布时间】:2018-03-08 07:25:14
【问题描述】:
我在行尾有一个带有自定义按钮的剑道网格。这是通过以下方式完成的:
<div class="demo-section k-content" style="float: right">
<button id="textButton" style="margin: 5px;">Open WFR</button>
<button id="textButton_remind" style="margin-left: 5px;">Remind Me</button>
</div>
columns: [
{
field: "WFR", title: "WFR", filterable: {
cell: {
operator: "contains",
suggestionOperator: "contains"
}
}
},
{ field: "Activity", title: "Activity" },
{ field: "Date", title: "Date" },
{ field: "Group", title: "Group" },
{ field: "MoreInfo", title: "More Information", hidden: true },
{ field: "Read", title: "Read", hidden: true },
{ template: '<button id="textButton" style="margin: 5px;">Open WFR</button>', title: 'View Event'}
$("#textButton").kendoButton();
我遇到的问题是,它只是更改网格中的第一个按钮。所以如果我有 3 行,只有第一个按钮在改变。当我创建不同的 ID 并将它们实现为剑道按钮时,它就可以工作了。如何为<button id="textButton" 动态分配 id 以创建单个按钮 ($("#textButton").kendoButton();)
【问题讨论】:
-
如果我的回答解决了您的问题,您能告诉我吗?
标签: button model-view-controller kendo-ui kendo-grid