Hello, I am trying to populate a treeview in perspective and I've been trying for the last 3 days and I can't seem to find a solution and I have yet to see any examples on how to implement it.
Here's what I did:
-
I used a query binding that is tied to items.
I get an error at the top that reads "items: string found, array expectd". Isn't my query a dataset, so it should not be throwing that error? -
I used a button to run the query and then throw the results in the tree.items property.
data =system.db.runNamedQuery('Test_Path')
lis =[]
for item in data.getColumnAsList(0):
lis.append(item)
self.getSibling("Tree").props.items = lis
I was on the documentation page for the Component and there is a .separationCharacter function that I don't know how to use I've tried adding this as property and I just cant get it to work.
My folder paths ar formated as such: \parentPath\child1\child2
I've also replaced the '' with '/' because I saw somewhere that the default seperation path is '/'.