2015-10-16 97 views
1

我正在使用Kendo UI網格來顯示數據。在這個現在我想合併三列。 就是這樣。 enter image description herekendo ui網格與堆積列

+0

你能解釋清楚你的要求嗎? –

回答

0

在你的數據,你可以把HTML行定義爲網格列下破壞<br />

var data = [ 
    {Id: 1, Location: "Long Side/Short Side<br />Sewer Septic<br />Meter location"}, 
    {Id: 2, Location: "Long side"}, 
    {Id: 3, Location: "sewer"}, 
    {Id: 4, Location: "North-east"},    
]; 

然後,encoded屬性設置爲false,這樣的內容作爲HTML處理:

$("#grid").kendoGrid({ 
    dataSource: data, 
    columns: [ 
     { field: "Id", title: "ID", }, 
     { field: "Location", title: "Location", encoded: false }, 
    ] 
}); 

DEMO