Posted 28 January 2022, 2:29 am EST
This is the html code that I am using and the sample data
<wj-multi-row [itemsSource]="data">
<wj-multi-row-cell-group>
<wj-multi-row-cell>
<ng-template wjMultiRowCellTemplate [cellType]="'Cell'">
<input type="checkbox" />
</ng-template>
</wj-multi-row-cell>
</wj-multi-row-cell-group>
<wj-multi-row-cell-group header="File Name" >
<wj-multi-row-cell binding="fileName"></wj-multi-row-cell>
<wj-multi-row-cell binding="pdfFileName"></wj-multi-row-cell>
</wj-multi-row-cell-group>
<wj-multi-row-cell-group header="File Size" >
<wj-multi-row-cell binding="fileSize"></wj-multi-row-cell>
<wj-multi-row-cell binding="pdfFileSize"></wj-multi-row-cell>
</wj-multi-row-cell-group>
<wj-multi-row-cell-group>
<wj-multi-row-cell binding="comments" header="Comments"></wj-multi-row-cell>
</wj-multi-row-cell-group>
<wj-multi-row-cell-group header="Password" >
<wj-multi-row-cell binding="filePassword"></wj-multi-row-cell>
<wj-multi-row-cell binding="pdfPassword"></wj-multi-row-cell>
</wj-multi-row-cell-group>
</wj-multi-row>
[
{
fileName: 'Test 1.xlxs',
fileSize: '100 kB',
filePassword: 'testpass',
pdfFileName: 'Test 1.pdf',
pdfFileSize: '110 kB',
pdfPassword: 'testpass',
comments: 'This is a test'
},
{
fileName: 'Test 1.xlxs',
fileSize: '100 kB',
filePassword: 'testpass',
pdfFileName: 'Test 1.pdf',
pdfFileSize: '110 kB',
pdfPassword: 'testpass',
comments: 'This is a test'
},
{
fileName: '',
fileSize: '',
filePassword: '',
pdfFileName: 'Test 1.pdf',
pdfFileSize: '110 kB',
pdfPassword: 'testpass',
comments: 'This is a test'
}
]
As you can see I am using multirow and the 0th and 1st index are for the 1 and 2 row in the image above, and the 2nd index is the one for the 3rd row. I wanted to hide the cell with fileName, fileSize and filePassword if they are blank or empty string. Is that possible with multirow? or do you have any suggestion?