I have two pages one page has kendo grid in it and grid column width is applied without an issue.
This code works:
<div class="row">
<div class="col-lg-12 pv-lg col align-self-center">
<kendo-grid [kendoGridBinding]="gridData" [pageSize]="pageSize" [pageable]="gridData.length > 9 && pageSize > 0"
[sortable]="false"
[filterable]="false"
[groupable]="false">
<ng-template kendoGridToolbarTemplate>
<button type="button" kendoGridExcelCommand ><span class="k-icon k-i-file-excel"></span>Export to Excel</button>
</ng-template>
<kendo-grid-column
*ngFor="let column of columnNames; let i = index;" field="{{column}}" [width]="calculateColumnLength(i)"></kendo-grid-column>
<kendo-grid-excel fileName="{{ cardTitle }}.xlsx" [fetchData]="allData"></kendo-grid-excel>
</kendo-grid>
</div>
</div>
However when I build tab strips with grid in it. The grid column width is not applied.
This code doesn't work:
<kendo-tabstrip (tabSelect)="handleTabSelected($event)">
<kendo-tabstrip-tab *ngFor="let tab of tabsInfo; let i = index" [title]="tab.tabName" [selected]="i == 0">
<ng-template kendoTabContent>
<kendo-grid [kendoGridBinding]="tab.gridData">
<ng-template kendoGridToolbarTemplate>
<button type="button" kendoGridExcelCommand ><span class="k-icon k-i-file-excel"></span>Export to Excel</button>
</ng-template>
<kendo-grid-column *ngFor="let column of tab.columnNames; let j = index;" field="{{column}}" width="230"></kendo-grid-column>
<kendo-grid-excel fileName="{{tab.tabName}}.xlsx" [fetchData]="allData"></kendo-grid-excel>
</kendo-grid>
</ng-template>
</kendo-tabstrip-tab>
</kendo-tabstrip>
I been on this issue for the past two days, could some one please point out what am I doing wrong.
Regards,
Alex