我有一個填充了數據的網格和 我只想顯示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