我有一个填充了数据的网格和 我只想显示3或2列并隐藏其余列,导致网格变得非常宽。 当鼠标悬停在一行上时,我想以popup /工具提示形式显示该行的所有列。在鼠标悬停上为KendoUI Grid中的每一行显示行细节作为弹出窗口/ ToopTip窗体
请帮我这个。我搜索了很多,只发现了可编辑的弹出窗口,并且点击了按钮而没有悬停。
function PopulateGrid() {
$("#recentNews").kendoGrid({
columns: [
{ field: 'Date', title: 'Date', width: 80,
template: '#=kendo.toString(toDate(NewsDate), "yyyy/MMM/dd") #'
},
{ field: 'TradeTime', title: 'Time', width: 60,
template: '#=kendo.toString(toDate(NewsTime), "hh:mm:ss") #'
},
{ field: 'Title', title: 'Description', width: 200 },
{ field: 'Country', title: 'Country', width: 40 },
{ field: 'Economy', title: 'Economoy', width: 40 }
],
dataSource: {
transport: {
read: {
url: 'Home/GetNews',
dataType: "json",
type: "POST"
}
},
schema: {
data: function (data) {
return data.data;
},
total: function (data) {
return data.total;
}
},
pageSize: 100
},
// change: onChange,
// dataBound: onDataBound,
dataBound: HoverOnGrid,
pageable: true,
sortable: true,
scrollable: true,
height: 565,
width: 2000
});
}
您是否考虑过使用KendoUI'grid' ['detailTemplate'](http://docs.kendoui.com/api/web/grid#detailtemplate-function)而不是'hoover'? – OnaBai