Dynamic multiheader
Hello.
I do table with remote data and different config. I wants build table with multi header( Tab index).
In order to achieve this, I recursively insert columns and it does not work. How can I still achieve this?
Thanks in Advance.

app-group-columns.html:

@kdinev, @zdrawku. Is there any information?
@ivanovla I don't see any reason this to be a problem, could you please share with me the exact version of our product that you are using?
@ivanovla Я не вижу причин, чтобы это было проблемой, не могли бы вы поделиться со мной точной версией нашего продукта, который вы используете?
The problem is that if I wrap igx-column or igx-column-group in other component, I get an empty table. Columns are not initialized. And in another recursive insertion, I cannot achieve.
Now i insert inside igx-grid bad code with repeat:

What i expect:

What i get if use component wrapper:

@zdrawku Is there any information?
He @ivanovla, your approach is pretty good. Having config with structural purposes is cleaner and will reduce the template code of your application indeed. I've used your approach in order to try to replicate the issue and everything seems to be working file with manual configuration of the nested levels. As for the recursion with custom ng-content, this is currently no possible, as @rkaraivanov explained in that issue
the content children query can't be resolved for a tag/component which is not declared inside the parent content
By using ng-container grouping element and ngIf directive you can implement the desired configuration that is needed for dynamic creation of Multi-header and regular columns. As for the recursion, now I am defining every nested level manually, although if this is not what you men, please let me know.
Working sample with StackBlitz
public gridConfig = {
parentColumns: [
{
pHeader: "ID",
field: "ID"
},
...
{
pHeader: "General Information",
childColumns: [
{ header: "Company name", field: "CompanyName" },
{ header: "Contact Name", field: "ContactName" },
{ header: "Contact Title", field: "ContactTitle" }
]
},
{
pHeader: "Address Information",
childColumns: [
{
header: "Town Location",
field: "Address"
},
{
header: "Country Location",
grandChildColumns: [
{ header: "Country", field: "Country" },
{ header: "Postal Code", field: "PostalCode" },
{ header: "City", field: "City" },
{ header: "Address", field: "Address" }
]
},
...
};
igxGrid Columns configuration by using ng-container
...
<ng-container *ngFor="let childColumn of column.childColumns">
<igx-column *ngIf="childColumn.field" [movable]="true" sortable="true" [header]="childColumn.header" [field]="childColumn.field"></igx-column>
<igx-column-group *ngIf="childColumn.grandChildColumns" [movable]="true" [header]="childColumn.header" [filterable]="false">
<ng-container *ngFor="let grandChildColumn of childColumn.grandChildColumns">
<igx-column *ngIf="grandChildColumn.field" [movable]="true" sortable="true" [header]="grandChildColumn.header" [field]="grandChildColumn.field"></igx-column>
</ng-container>
</igx-column-group>
</ng-container>
...
@zdrawku Yes, you sent me a similar example, as I wrote, only with more nesting. I do it because there is no choice. Too bad there is no solution with recursion, thanks for the support
He @ivanovla, your approach is pretty good. Having config with structural purposes is cleaner and will reduce the template code of your application indeed. I've used your approach in order to try to replicate the issue and everything seems to be working file with manual configuration of the nested levels. As for the recursion with custom ng-content, this is currently no possible, as @rkaraivanov explained https://github.com/IgniteUI/igniteui-angular/issues/4966#issuecomment-498232941
@zdrawku there are any news after 5 years? Thanks a lot
Any news ?