Filter a DataGrid on a Text box

前端 未结 4 1969
挽巷
挽巷 2020-12-03 01:12

I search an example or sample to filter the WPF DataGrid column elements by a textbox.

\"alt

S

4条回答
  •  Happy的楠姐
    2020-12-03 02:00

    You can filter the Items in the DataGrid by binding it to an ICollectionView that supports filtering.

    Details here for .NET 4. The process is the same for .NET 4.5, but it seems the documentation has been lost. There's a small mention to it here under the "Grouping, Sorting, and Filtering" heading.

    edit: at the time this was originally written, the WPF toolkit had not been abandoned by Microsoft. The controls that used to be part of it are now in the framework, and the toolkit was alive and doing well here

提交回复
热议问题