【发布时间】:2014-11-24 18:57:30
【问题描述】:
我有一个带有按钮列的剑道网格。单击按钮时,我希望它以行的数据作为参数调用 javascript 函数。这是我目前所拥有的
$(grd).kendoGrid({
dataSource: ds,
detailInit: detailInit,
columns: [ {field: "foo", title: "bar" },
{field: "Y" },
{command: { text: "MyButton", click: doStuff } } ]
});
function doStuff(e)
{
//e is click events but I want to pass in data from the row instead
//following is code I found here but item is null for me
var row = $(this).closest("tr");
var item = $(grd).data("kendoGrid").dataItem(row);
}
【问题讨论】:
标签: kendo-ui kendo-grid