How to get one Igx-column value into another column. We have created a variable inside igx-column, when we try to access that variable inside another igx-column then it is displaying [object] [object].
Created object like below:-
<igx-column #docid field="documentId" header="Document Id" [filterable]="true" dataType="string" style="font-size:20px"> </igx-column>
<igx-column field="source" header="Source" [filterable]="true" dataType="string" style="font-size:10px"> <ng-template igxCell let-cell="cell"> <div *ngIf="cell.value==2"> <span> {{docid}} <img src="../../assets/icons/po-ack-Icon.png" /> </span> </div> </ng-template> </igx-column>
Hello Vaishnavi,
Thank you for posting in Infragistics Community!
I believe you will find the following sample very helpful in order to achieve your requirement. As you can observe, I am using ‘rowData’ and after that column’s field, in your case ‘DocumentId’, to access other column's value instead of the cell value.
Please have a look at the provided sample and If it is not an accurate demonstration of what you are trying to achieve please feel free to modify it and send it back to me for further investigation.
Looking forward to hearing from you.
Regards,
Malin Hadzhiev
Entry Level Software Developer
Infragistics
Thank you! This helped me to achieve my requirement.
I am glad that you find my suggestion helpful and were able to solve your issue.
Thank you for using Infragistics components.
Malin Hadzhiev,
Hi,
Just wanted to say I was trying to use this answer to help with the same issue and I was hit with errors.
I think something must have changed, I had to call {{cell.row.data}} not cell.rowData to access the row properties.
Hope this helps anyone having the same issue!