How to populate filter dropdown in a TreeGrid

We have a multi column TreeGrid, with Filters for each column in the form of a dropdown. The tree populated will have only 2 level hierarchy, filtering should happen till the child level when the tree is expanded.

Please suggest a way to populate the Dropdown with unique values of that column ?

On using the showFilterEditor: true, we could only able to see the Dropdown Filter but couldn’t able to populate it.

There is similar request for Listgrid implementation on this post : http://forums.smartclient.com/showthread.php?t=2417&highlight=filterEditorType%3A

But this refers to listgrid and we cannot use it for treegrid as the API’s for both of them are different.

When TreegridID.data.getProperty(fieldName).getUniqueItems () used, throws a javascript exception.

Note first: if you’re seeing a JavaScript error, you must always post the stack trace.

Your call should be more like:

var data = treeGridID.data;
data.getRange(0,data.getLength()).getProperty(fieldName).getUniqueItems()

However, consider that this overall approach only makes sense for smaller datasets. If the data is too large to be completely loaded, use listGridField.filterEditorProperties to provide an optionDataSource instead.