0
我想在w2ui網格的一個單元格中有幾個文本行。我試了下面的代碼:在w2ui網格中有多個文本行的單元格
$(function() {
$('#grid').w2grid({
name: 'grid',
header: 'List of Names',
columns: [
{ field: 'fname', caption: 'First Name', size: '30%' },
{ field: 'lname', caption: 'Last Name', size: '30%' },
{ field: 'email', caption: 'Email', size: '40%' },
{ field: 'sdate', caption: 'Start Date', size: '120px' }
],
records: [
{ recid: 1, fname: "Peter", lname: "Jeremia", email: '[email protected] <br> [email protected]_corporation.com', sdate: '2/1/2010' },
{ recid: 2, fname: "Bruce", lname: "Wilkerson", email: '[email protected]', sdate: '6/1/2010' },
{ recid: 3, fname: "John", lname: "McAlister", email: '[email protected]', sdate: '1/16/2010' },
{ recid: 4, fname: "Ravi", lname: "Zacharies", email: '[email protected]', sdate: '3/13/2007' },
{ recid: 5, fname: "William", lname: "Dembski", email: '[email protected]', sdate: '9/30/2011' },
{ recid: 6, fname: "David", lname: "Peterson", email: '[email protected]', sdate: '4/5/2010' }
]
});
});
我收到一個grig,所有的行都有相同的高度。有兩行文字的單元看起來很難看:
所以我的問題是:是否有一個簡單的方法可以使行高度可調整爲文本行數?
w2ui中是否有合併的單元格功能? Handsontable中的一種 –
@ A.Bykov編號在w2ui單元格中不能有colspan或rowspan。 –