Posted 18 July 2023, 2:46 am EST - Updated 18 July 2023, 2:56 am EST
Hi,
I have Parent component and child component. I have a grid in child component.
when I click on button present in the parent component, Calling initTabsInfo() method. there we are forming grid data.
Grid is not loading
ParentCompoent.html
parentcompoent.ts
viewChanges(){
this.childComponent.initTabsInfo(this.reportChanges.target.has.data[0], this.reportChanges.source.has.data[0]);
}
ChildCompoent.html
childComponent.ts
[code] flexInitialized(grid: FlexGrid): void {
this.gridInfo.push(grid);
grid.autoSizeColumns();
}
tabInit(tabPanel: any) {
this.tabPanel = tabPanel;
tabPanel.selectedIndexChanged.addHandler((s: any, e: any) => {
let index = s.selectedIndex;
this.gridInfo[index].autoSizeColumns();
})
}
initTabsInfo(targetContainerID, sourceContainerId){
this.isLoaderBusy = true;
console.log(“this.initTabsInfo”,targetContainerID, sourceContainerId, this.tabHeaders);
this.tabHeaders$ = of(this.tabHeaders);
concat(this.tabHeaders$.pipe(
mergeAll(),
concatMap((tab)=>{
console.log(“tab”, tab);
return this.templateService.getTabsGridData(tab, targetContainerID, sourceContainerId);
}),
toArray()
)).subscribe((response)=>{
console.log(“response”, response);
response.map(res=>{
console.log(“res”,res);
this.tabsInfo.push({
header: res.tabHeader,
data: res.result
});
})
},(error) => {
},()=>{
console.log(“complete”, this.tabsInfo);
})
}[/code]