答案 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 强>