Replies
Thanks for your response!!!
My requirement was slightly different but your code given me hint how we can invoke onColumnInit event. We have only one data source and we pass where clause in different fields and after that, once data is returned we check if there is not data in any column, hide that.
I have created three set of headers, 2 of them are duplicate and added a dummy column in 3rd one.
Also, added a condition in onColumnInit to check if field is undefined to keep that hide always
and also used below code to invoke onColumnInit:
If there is better solution for this please let me know so that i can get rid of 3 header sets and dummy column.
Thanks,
Jitender
Hello Teodosia,
Thanks for your time to look into this. I can see solution you provided in stackblitz.com working fine but my requirement is bit different. We have a dropdown and a button we select a value from dropdown and hit button, it fetch data from endpoint based on selected value and load data in igx-grid. After that we want to hide columns if there are no values.
We were using below function in ag-grid but could not find replacement in igx-grid. It would be great help if you could provide solution for this.
$scope.gridApi.hideEmptyColumns();