I have a treelistbox and a search textbox. The treelistbox has a simple string filter based on StringFilterBase which is bound to the textbox's text. The treelistbox AutoExpandItemsOnFilter is set to TRUE.
At start when all items are not expanded and I search for something, I select a sub item and then clear the search text which sets the IsFilterActive property to false.
For some reason the selected item is not what I selected. Instead it bubbles its way up to the first non expanded item.
You can actually reproduce this on the demo application. Go to Grids -> TreelistBox Quickstarts -> Filtering. Enable AutoExpandItemsOnFilter, enable IsFilterActive and search for "Alberta". Its a sub item of "Canada". Select it. Now uncheck "IsFilterActive". The selection goes back to "Canada" although Alberta is still visible and expected to still be selected.
This is quite annoying imagine we have a large item collection and on disabling the filter it jumps to the top while the user has selected an item at the bottom of the list.
I think this behavior was changed in one of the last updates (not the latest). I feel like this was not the case in an earlier version.
[Modified 2 years ago]