Я попытался установить ширину столбца в угловых таблицах данных с помощью фильтров. Но ширина столбца не изменилась.
Я пытаюсь следовать
var columnsSpecification = [
{
type: 'text',
bRegex: true,
bSmart: true
}, {
type: 'text',
bRegex: true,
sWidth:"90px"}];
$scope.dtOptions = DTOptionsBuilder.newOptions()
.withBootstrap()
.withOption('scrollX', '700%')
.withOption('scrollY', height + 'px')
.withOption('oLanguage', { "sEmptyTable": " " })
.withOption('lengthMenu', [[-1, 1000, 100, 50, 25, 10], ['All', 1000, 100, 50, 25, 10]])
.withOption('paging', false)
.withOption('bInfo',false)
.withColumnFilter({
aoColumns:columnsSpecification
})
.withTableTools('/Content/DataTables/swf/copy_csv_xls.swf')
.withTableToolsButtons(['xls']);
В html-файле я пробовал это:
<table id="table-machines" datatable="ng" class="table table-striped" dt-options="dtOptions">
<thead>
<tr>
<th>Name</th>
<th style="width: 90px !important">Value</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="m in records>
<td>{{m.name}}</td>
<td style="width: 90px !important">{{m.Value}}</td>
</tr>
</tbody>
Но столбец Value другой zise, а не я установил.
Я обнаружил, что если нет фильтра - все нормально.
Как установить ширину таблицы и сохранить фильтры?
.withOption('autoWidth', false)
. - person Gyrocode.com   schedule 08.09.2015