c# - Quick Filter in WPF ListView -


Our project has a quick filter option, when a user types, "test" in the text box means, It filters out the WPF ListView with the matching text on 3 columns (there are 7 columns in the view). The problem is, the list takes a little more time to filter the item item (say 3 seconds). And the user will have to wait to complete the filter for "T" to type the "A" unit. This gives a bad experience to the user.

The list view should be used for the overview option & lt; SomeItemViewModel & gt; . I had a different dictionary & lt; String, string & gt; I tried to place the searchable column in , where the value 3 would be the string contex of the searchable columns, instead of searching each row from each column and Observable Collection, I used to match the dictionary value I can filter the record and fill the archive . This approach works a bit better, but is still not satisfactory.

Any other approach?

One option filtering must not be initiated as the user starts to type what you can do In the OnTextChanged event of a textbox, start a very short timer with the Timespane, which will not take into account users (in 100 milliseconds). The termination of the timer times will trigger an event that will start filtering. If the timer changes the text before the expiration date, then reset the timer. Filter the text only when the timer expires, ensuring that after filtering the user will finish typing all the text, which they want to filter.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -