Posted 30 October 2017, 6:18 am EST
Title says it all
Based on that article :
https://www.grapecity.com/en/blogs/wijmo-2017-v1-landed
I’m now implementing my own inherited FlexGrid class, which allows great things and a lot of ease in development, thanks for that.
However, I’m stuck with the context menu.
Currently, I’m already adding one to my grids dynamically with a factory resolver. But it still needed to be set as a directive in the grid
<wj-flex-grid [wjContextMenu]="contextMenu" .... </wj-flex-grid>
That’s not that pretty though.
But now, the context menu will be into the custom grid class, so i’ll have to do something like :
<custom-grid #grid [wjContextMenu]="grid.contextMenu" .... </custom-grid>
Which is even less pretty, and in opposition to my wish of delegating that job to the customized grid itself, but which actually DO works.
So, I’m more of looking for a A plan instead of that B plan to deal with it.
Sadly, angular has difficulties adding dynamical directives, as shown here :
https://github.com/angular/angular/issues/8785
So I didn’t succeed yet doing stuff like :
@HostBinding('attr.wjContextMenu') contextMenu:WjMenu = this.contextMenu;
ngOnInit(): void {
this.contextMenu.ngOnInit();
}
ngAfterViewInit() and so on...
Would be awesome if you guys had better idea than me.
Is there no way to affect that context menu to a component that a directive ?
Thanks in advance for your help en highlightment.