Home Forums WPF controls Xceed DataGrid for WPF Handle ‘selection changed’

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #23515 |

    Hello,

    how is the idea handling “selection changed”? I found some ways, but not sure what is the right…

    1.) WPF like is casting SelectedItems as System.Collections.ObjectModel.ObservableCollection<object>
    Than you are free to observe it with CollectionChanged += …
    But why has ‘SelectedItems’ ‘IList’ as returntype??? It is easier but not helpful.

    2.) Register on PropertyChanged-Events and filter for “ItemChanged” but in documentation is written, that it is may be the same like selecteditem. May be !!!

    Some more ideas?

    Thanks,
    Sascha

    Imported from legacy forums. Posted by Sascha (had 2082 views)

    Xceed Support
    Member
    Post count: 5658

    1) This scenario was already discussed a lot… Let’s say that for the moment, the property is “castable” as a INotifyCollectionChanged. 😉

    2) Alternatly, you can use a DependencyPropertyDescriptor for the SelectedItemProperty to register a changed handler…

    Imported from legacy forums. Posted by Marcus [Xceed] (had 2945 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.