I have this line of code:
this.treegridCompliance22.filterSettings.hierarchyMode = “Both”
That’s ok, but my problem is the treegrid in question is hidden initially so I can’t put it in OnInit. That’ll generate undefined errors since it doesn’t know what it is yet.
Is there a way to put that in here?
public treegridCompliance22: TreeGridComponent;
dataBoundCompliance22(args) {
Object.assign((this.treegridCompliance22.grid.filterModule as any).filterOperators, { startsWith: 'contains' });
}
Or otherwise include it in the treegrid definition?
<ejs-treegrid #treegridCompliance22 id='treegridCompliance22' [dataSource]='ticketsByComplianceLineItem'
[treeColumnIndex]='0' childMapping='subitems' width = '1400' height = '315' allowEditing= 'true'
[allowFiltering]='true' (dataBound)='dataBoundCompliance22()'
allowTextWrap='true' [textWrapSettings]='wrapSettings'
[allowExcelExport]='true'>
Such that it’ll set the hierarchy mode to “Both” even though the control is initially hidden?
Thanks
<ejs-treegrid #treegrid [dataSource]='data' allowPaging='true' height='350' allowFiltering='true'
[pageSettings]='pageSettings' (load)="load()" childMapping='subtasks' [treeColumnIndex]='1'>
<e-columns>
App.component.ts
….
load() {
(this.treegrid as any).filterSettings.hierarchyMode = 'Both';
}
|
Perfect!
Thanks very much