Posted 21 January 2019, 3:26 pm EST
I am using the FlexGrid with Angular 6 to display data in a hierarchical tree view.
Here is the grid =
<wj-flex-grid #hierarchygrid
[itemsSource]="hierarchyData"
[childItemsPath]="'children'"
[selectionMode]="'Row'"
[style.height.px]="gridHeight"
(initialized)="init(hierarchygrid, 40)">
<wj-flex-grid-filter #filter (filterApplied)="filterApplied(filter)" (filterChanging)="filterChanging(filter,$event)" (initialized)="initFilter(filter)"></wj-flex-grid-filter>
<wj-flex-grid-column *ngFor="let col of columns" [header]="col.header" [binding]="col.binding" [visible]="col.visible" [isContentHtml]="true" [width]="col.width">
</wj-flex-grid-column>
</wj-flex-grid>
And the definitions are =
this.columns = [
new WijmoGridRowDefinition('Level' , 'HierarchyLevel' , 1),
new WijmoGridRowDefinition('' , 'Actions' , 1, 50),
new WijmoGridRowDefinition('Owner Name' , 'RelatedEntityName' , 1, 400),
new WijmoGridRowDefinition('Owner Type' , 'RelatedEntityType' , 1),
new WijmoGridRowDefinition('Owner Parent Name' , 'RelatedEntityParentEntityName', 1),
new WijmoGridRowDefinition('Relationship to Child' , 'RelationshipType' , 1),
new WijmoGridRowDefinition('Owner Direct Child' , 'PreviousEntityName' , 1),
new WijmoGridRowDefinition('DirectOwnership' , 'DirectOwnership' , 1),
new WijmoGridRowDefinition('Relationship Note' , 'RelationshipNote' , 1),
new WijmoGridRowDefinition('Active Relationship' , 'IsActive' , 1),
new WijmoGridRowDefinition('Start Date' , 'DirectStartDate' , 1),
new WijmoGridRowDefinition('End Date' , 'DirectEndDate' , 1),
new WijmoGridRowDefinition('CompoundOwnership' , 'CompoundOwnership' , 1),
new WijmoGridRowDefinition('Effective Start Date' , 'EffectiveStartDate' , 1),
new WijmoGridRowDefinition('Effective End Date' , 'EffectiveEndDate' , 1),
new WijmoGridRowDefinition('Owner Entity ID' , 'RelatedEntityID' , 1, 80),
new WijmoGridRowDefinition('RelatedEntityAkaName' , 'RelatedEntityAkaName' , 0),
new WijmoGridRowDefinition('RelatedEntityTaxID' , 'RelatedEntityTaxID' , 0),
new WijmoGridRowDefinition('RelatedEntityStatus' , 'RelatedEntityStatus' , 0),
new WijmoGridRowDefinition('RelatedEntityICCode' , 'RelatedEntityICCode' , 0)
];
Which uses this model =
export class WijmoGridRowDefinition {
constructor(
public header?: string,
public binding?:string,
public visible?: any,
public width?: any,
public innerHTML?: any
) { }
}
And attached in a file is some sample data…
Notice how at level 2, item “Broadway Street XII, LP” has value of “DirectOwnership”: “1.0000000000” but the grid shows “0.9424250000”
