I have table like this:
<table class="table table-bordered">
<tbody data-bind="foreach: { data: dataset, as: 'rowInfo' }">
<tr style="max-height: 30px"
data-bind="foreach: { data: $parent.metadata, as: 'colInfo' }">
<td style="max-height: 30px" data-bind="text: rowInfo[colInfo.DataColumn],
attr: {width: Width}"></td>
</tr>
</tbody>
</table>
I want to have a grid like experience. So I don't want the text to wrap in the cell or make the cells to resize.
I want to have fixed sized cells which their height
set to 30px
and the width
set to the colInfo.Width
which comes from knockout.
But with the above code, the cells re-size to fit their content. How should I set the attributes to have fixed height
and width
?