Searchable DataGrid RRS feed

Toutes les réponses

  • Hello,

    for the filter, you could use a CollectionView

    You have to set the SourceCollection property with your original collection, then you just have to set the Filter property with a delegate determining whether each item must be included in the "View" of the original list.

    highlighting text in the datagrid seems to me tricky wihtout specific developpment. You won't avoid an agreed binding (ancestorType, or binding a property that is supposed to be found in the datacontext and so on) in the style of the row. A DataTriger could handle the value and setting the background color of the root grid of the row.
    According to me, inheriting from DataGrid would be suitable in this case to add SearchedValue property, HighlitedRowBackground...

    Hope this will help a bit

    mardi 5 juin 2012 13:37