0
我已經創建了一個kendo窗口,裏面有一個網格。我只想在網格上創建一個滾動條,而不是在劍道窗口上創建。我無法在網格上創建滾動條。 請爲我提出適合此問題的解決方案。如何在kendo ui grid中啓用滾動條
HTML part is as follows :
<html>
<body>
<div id = "mywindow">
<h1>Work Order</h1>
<div id="grid"></div>
</div>
<a href="#" id="btnGO">Go</a>
</body>
</html>
JavaScript部分如下:
$(document).ready(function() {[screenshot for error in scrollbar][1]
jQuery('#mywindow').kendoWindow({
width:300,
height:400,
animation: false,
autoFocus: true,
visible:false,
resizable : false
});
$('#btnGO').click(function(){
$('#mywindow').data('kendoWindow').center().open();
});
$("#grid").kendoGrid({
height : 100,
selectable: "multiple cell",
allowCopy: true,
columns: [
{ field: "student", title: "student"},
{ field: "student", title:"Mins"}
],
scrollable : true,
dataSource : [
{student: 10,mins: 120},
{student: 11,mins:100},
{student: 12,mins: 90},
{student: 12,mins: 90},
{student: 12,mins: 90},
{student: 12,mins: 90},
{student: 12,mins: 90},
{student: 12,mins: 90},
{student: 12,mins: 90},
{student: 12,mins: 90}
]
});
$('#grid .k-grid-content').scroll(function()
{ alert('I am scrolling ...'); });
});
CSS部分如下:
.k-window div.k-window-content
{
overflow: hidden;
}