FlexGrid Hierarchy data mixed up

Posted by: jason.brandt on 21 January 2019, 3:26 pm EST

    • Post Options:
    • Link

    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”

  • Posted 21 January 2019, 3:30 pm EST

    Sample data as zipsampledata.zip

  • Posted 22 January 2019, 3:03 am EST

    Hi,

    Thanks for the code snippet and sample data. However, we are sorry but we are unable to replicate the issue at our end.

    We have prepared a sample based on the sample data and code snippets, could you please have a look at it and let us know if we need to make any changes in the sample in order to replicate the issue:

    https://stackblitz.com/edit/angular-hxkfy8?file=src%2Fapp%2Fapp.component.ts

    ~Sharad

  • Posted 22 January 2019, 1:33 pm EST

    Yes, I realize now that i have a duplicate ng-template causing the issue. Thank you!

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels