0

Tree missing 'selectedItems' attribute?

asked 2012-09-18 10:42:34 +0800

davout gravatar image davout
1435 3 18

Why is it that the 'Tree' component has no 'selectedItems' attribute?

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2012-09-19 01:56:13 +0800

iantsai gravatar image iantsai
2755 1

I don't get your point, tree does has getSelectedItem() method.

link publish delete flag offensive edit

answered 2012-09-19 04:30:39 +0800

davout gravatar image davout
1435 3 18

updated 2012-09-19 04:31:17 +0800

For...

<tree id="portfolioTree" 
      width="100%" 
      sizedByContent="true" 
      model="@bind(vm.portfolioModel)" 
      checkmark="true" multiple="true" 


... I was expecting '<tree>' to support the 'selectedItems' attribute, just as with Grid and Listbox. It doesn't and I can't understand why.

link publish delete flag offensive edit

answered 2012-09-20 07:16:38 +0800

iantsai gravatar image iantsai
2755 1

Could you post a pseudo code of how you want to use this "selectedItems property" in your code?
And here is a relative discussion of tree and MVVM: Why tree's items are displayed like a pointer in MVVM?
maybe this is what you are looking for.

link publish delete flag offensive edit

answered 2012-09-20 09:31:28 +0800

davout gravatar image davout
1435 3 18

The use case is exactly the same one that exists for the grid and listbox. The 'selectedItems' attribute would collect a list of all checked tree nodes for any tree which has the 'multiple' attribute set to 'true'.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2012-09-18 10:42:34 +0800

Seen: 141 times

Last updated: Sep 20 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More