This example plunker shows how we can have duplicate values represented in our tree data-enabled grid by using a separate set of values for our tree hierarchy:
Notice how all the values for 'Organisation Hierarchy' are 'Erica Rogers. This is achieved with the following data:
var rowData = [ { orgHierarchy: ['1'], name: 'Erica Rogers', jobTitle: 'CEO', employmentType: 'Permanent', }, { orgHierarchy: ['1', '2'], name: 'Erica Rogers', jobTitle: 'Exec. Vice President', employmentType: 'Permanent', }, { orgHierarchy: ['1', '2', '3'], name: 'Erica Rogers', jobTitle: 'Director of Operations', employmentType: 'Permanent', },
As you can see, orgHierarchy is actually an array of numbers not represented in the grid. Instead, a valueGetter is used to show 'name' while orghierarchy is used only for:
getDataPath: function (data) { return data.orgHierarchy; },
Comments
0 comments
Please sign in to leave a comment.