tags:

views:

28

answers:

1

How do i search for a node in very large treeview , i am using on-demand loading of nodes?

+1  A: 

Your question is a little light on details. For example, I would be curious to know if this is a user-specified search and what the search criteria would look like. In any case, I'll take a stab at giving you a general answer to your general question:

WPF makes it easier than ever to base the view on a data model structure of your own choosing, rather than the other way around.

I would suggest creating an object model that represents the underlying data (you may have this already) and "bind" it to the tree view via data templates (specifically the HierarchicalDataTemplate). Define your search in terms of the data structure, not the view.

Daniel Pratt
Thanks Danieli am doing exactly the same thing as you are saying but if user is supplying a search value and that value belongs to a node which is not loaded yet than i need to load it than search it but it takes a hell lot of time i am ding recursive search in my model
saurabh
How are you storing the data that gets loaded into the treeview?
Daniel Pratt