Hi,I am trying to search and filters the content of a xamDataTree based on a HierarchicalDataTemplate. The user type a string into a search TextBox and on the TextChanged event of this textbox, the content of the treeview is filtered, according to the user input. I am trying to do exactly what is done by the solution explorer of Visual Studio 2012. I have read a lot of articles and forums but i didn't find a solution yet. I am using a xamDataTree, a CollectionViewSource as datasource. I am using MVVM .If anyone have an idea or even better, a solution, please share it :). Thank you in advance for your help!Regards,kabinad
Hello Amilcar,
Thank you for your post. I have been looking into it and I believe Rob has already answered your question here:
http://ko.infragistics.com/community/forums/p/48215/448645.aspx#448645
Hey thank you for your response.
Would it be possible to expand your provided example to do as Kabinad asked regarding filtering on child nodes aswell?
'But this sample does not include feature to filter node at any level. I want it to work in a way that if i type "Item 0 1 0" it only show this node and of course its parent(i.e a feature like vs solution explorer search).'
Hello Kabinad,
I have been looking into your sample and I modified it, so now there isn't a Binding error, I changed the binding like this:
<Setter Property="Visibility" Value="{Binding RelativeSource={RelativeSource Self}, Path=Node.Data.IsVisible, Converter={StaticResource BoolToVisibility}}" />
because the DataContext was the CollectionView, not the Node.
Hope this helps you.
Can you help me with XamDataTreeNodeControl BindingExpression error ? Here is what happened
I tried to bind "IsVisible" property (i.e which is boolean and i used converter) to XamDataTreeNodeControl.This was needed to change the visibility of the Node.
And i get "System.Windows.Data Error: 40 : BindingExpression path error: 'Data' property not found on 'object' ''CollectionView' (HashCode=11782688)'. BindingExpression:Path=Data.IsVisible; DataItem='CollectionView' (HashCode=11782688); target element is 'XamDataTreeNodeControl' (Name=''); target property is 'Visibility' (type 'Visibility')"
can you please check and comment on the problem.
i am using infragistic version 12.2.20122.2202 .
Thank you !
Thank you for your support. It filters as far as i added level one names like item 0,item 1... But this sample does not include feature to filter node at any level. I want it to work in a way that if i type "Item 0 1 0" it only show this node and of course its parent(i.e a feature like vs solution explorer search). Can you extend this sample to do that Like that.