最近,我一直在使用Kendo UI,但我遇到了以下问题:我的Kendo网格的寻呼机与我的网格底部并不齐平。我已经尝试编辑<uses-permission android:name="android.permission.INTERNET"/>
的CSS样式,但它没有解决问题。为了补充说明,在我将寻呼机450px的上边距设置为向下移动之前,寻呼机曾经位于左上角。但是,我想要一个动态的修复,它可以适应网格的整体高度。还要注意黑色边框漂浮到侧面 - 这是寻呼机的一部分,怎么样?他们一定要把我的课程藏起来......或者我只是不知道。无论如何,这是我的混乱网格的图像:
我用来修改网格及其样式的CSS代码:
k-grid-pager
最后用于布局网格的html / js:
#konTable2 {
position:absolute;
left: 150px;
margin-right: -50%;
background-color: rgba(0,0,0,0);
border:0px solid rbga(0,0,0,0);
}
.k-grid tr th {
border-bottom: 1px solid black;
text-align: center;
height:25px;
}
.k-grid tr td{
background-color: #494949;
border-bottom: 1px solid black;
text-align: left;
mix-blend-mode:hard-light;
}
.k-grid-pager {
position: relative !important;
float: left !important;
background-color: lime;
width:900px;
left:50%;
margin-right: -450px;
margin-top:450px;
}
<div id="konTable2"></div>
<script src="../json/Koncerts.jsonp"></script>
<script type="text/javascript">
var myConcerts = concerts;
$(function() {
var dataSource = new kendo.data.DataSource({
data: myConcerts
});
$('#konTable2').kendoGrid({
columns: [{ title: "Artist", field: "artist", template: "<div class='name' style='width:200px'>#= artist #</div>"},
{title: "Concert", field: "concert", template: "<div class='name' style='width:250px'>#= concert #</div>"},
{title: "Date", field: "date", template: "<div class='date' style='width:150px'>#= date #</div>"},
{title: "City", field: "location.city", template: "<div class='name' style='width:150px'>#= location.city #</div>"},
{title: "State", field: "location.state",template: "<div class='name' style='width:150px'>#= location.state #</div>"}
],
dataSource: {
data: myConcerts,
pageSize: 5
},
selectable: true,
sortable: true,
scrollable: false,
pageable: {
refresh: true,
pageSizes: true,
buttonCount: 5
},
});
});
</script>
来改变寻呼机的位置,它看起来好一点,更像是这样:
注意:我没有像前面的例子那样包含垂直翻译。现在你可以看到寻呼机只是想在网格的左上角放松一下......另外,这里是新的相关CSS:
k-pager-wrap
答案 0 :(得分:0)
POST CLOSED
我意识到我在使用kendo之前忘记了html表元素的css样式......是的!
这是我忘了的代码:
table, .gridStyle {
font-size:2em; !important;
text-align:center; !important;
position:absolute;
float:left; !important;
width:1200px; !important;
left:50%; !important;
margin-left:-600px;
margin-top:20px; !important;
height:80px; !important;
background-color:lightgrey;
}
.gridStyle {
font-size:26px !important;
height:290px;
border:1px solid aliceblue;
}
th{
background-color:lightgrey;
border:2px solid grey; !important;
text-align:center;
border-radius:0px;
padding:4px;
mix-blend-mode:normal;
font-color:lightgrey;!important;
word-wrap:normal;}
td{
background-color:lightgrey;
border:2px solid grey; !important;
text-align:center; !important;
border-radius:0px;
padding:4px;
mix-blend-mode:normal;
word-wrap:normal;}
tr{border-width:2px; !important;}