我有一个网格和一个列值,如下所示:
“diskstatus”列
“C<br>Blue先生拥有一座蓝色房子和一辆蓝色汽车。”
我试图用'/n'替换<br>,但它没有给出新行(请参阅下面的代码)
this.resultData.foreach(x=>x.diskstatus)=
x.diskstatus.replace(//mg,“\n”);
如何在网格单元中换行?
<table id="groups" class="table table-bordered table-hover dataTable" [mfData]="resultData" #mf="mfDataTable" [mfRowsOnPage]="rowsOnPage"
[(mfSortBy)]="sortBy" [(mfSortOrder)]="sortOrder">
<thead>
<tr role="row">
<th> <mfDefaultSorter by="HostName">Host Name</mfDefaultSorter></th>
<th><mfDefaultSorter by="CPUStatus">CPU Status</mfDefaultSorter></th>
<th><mfDefaultSorter by="DiskStatus">Disk Status</mfDefaultSorter></th>
</tr>
</thead>
<tbody *ngIf="resultData.length>0">
<tr *ngFor="let result of mf.data | filter:filter; let i = index">
<td>{{result.HostName}}</td>
<td>{{result.CPUStatus}}</td>
<td>{{result.DiskStatus}}</td>
</tr>
</tbody>
<tr *ngIf="resultData.length <=0"><td colspan="10"> No Data Found</td></tr>
<tfoot>
<tr>
<td colspan="8">
<mfBootstrapPaginator></mfBootstrapPaginator>
</td>
</tr>
</tfoot>
</table>