Scrolling fixedview search gridview in datagrid using wpf

I am trying to implement the “find” function, where the user can enter a value in the text box (outside the grid), then click the button to find a line that matches the search criteria. if the search item is found in the gridview that was looking for the record, it was fixed at the top of the gridview, and the rest of the records scroll, except for the found record. I need to show this criterion in wpf. Let someone suggest me ...

Thanks in advance.

0
source share
2 answers

You will have a data grid in your view (xaml and xaml.cs), where you will bind ItemSource to an observable collection in your view model. You will enter your input from your text box and put it through your search algorithm. The search algorithm will filter the data in the collection, and you can simply move the item you want in the collection to the front.

0
source

This is a difficult problem if you want to do it right. To freeze strings, see This: http://blogs.msdn.com/b/vinsibal/archive/2008/10/31/wpf-datagrid-frozen-row-sample.aspx

0
source

Source: https://habr.com/ru/post/1534041/


All Articles