2
在我的劍道網格中,我有一個有html值的列。顯示時會增加網格的高度。如何修復劍道網格的高度
如何確保數據以單行顯示,無論值是多少。
點擊here爲小提琴。
$("#grid").kendoGrid({
columns: [
{ title: "Name", field: "name", encoded: false }
],
dataSource: [ { name: "<br>Jane Doe</br><br>Lespie Knope</br><br>Ron Swanson</br>" } ]
});
.k-grid tbody tr {
width: 50px;
}
.k-grid td {
white-space: nowrap;
}
<link rel="stylesheet" href="http://cdn.kendostatic.com/2015.1.318/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2015.1.318/styles/kendo.rtl.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2015.1.318/styles/kendo.default.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2015.1.318/styles/kendo.dataviz.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2015.1.318/styles/kendo.dataviz.default.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2015.1.318/styles/kendo.mobile.all.min.css">
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://cdn.kendostatic.com/2015.1.318/js/kendo.all.min.js"></script>
<div id="grid"></div>
你想如何顯示數據?就像這個'Jane Doe,Lespie Knoper,Ron Swanson'一樣? – Supersnake
你沒有休息過嗎? 'htmlname:「Jane Doe,Lespie Knope,Ron Swanson」' –
我不想更改數據。我只想向用戶顯示第一行。 –