Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
280
synchronizing selection with viewmodel
posted

(New user of xamDataGrid 8.1)

My ultimate goal is to be able to perform my logic in my viewmodel class.

I am binding the grid to an XmlDataProvider, and currently I've got it to work sort of by hooking the SelectedItemsChanging event and adding a dummy xml attribute to the bound data indicating if it is selected or not. While seems to work it feels like a hack.

Would it possible to directly bind the IsSelected of a datarecord to an xml attribute?

Is there a better way to make the viewmodel aware of currently selected items/records without taking a reference to the grid?