Hello, I am really new to Infragistics and XamGrid...
I have a XamGrid whose ItemsSource is bound to an ObservableCollection. The ObservableCollection contains objects that have a property called IsSelected (type bool).
I want to do the following two things:
1) Create a style for the row so that when the row gets selected a property in its datacontext gets set. If I were using a ListoBox I would say:
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="IsSelected" Value="{Binding Path=IsSelected, Mode=TwoWay}"/> //Selected
</Style>
2) When the user doubleclicks on a row I want to execute an action (through an ICommand) defined in its DataContext (the object contained in the ObservableCollection).
This may be simple for most of you but I could really use the help.
Thanks in advance!
Hello Roberta,
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
Stefan,
For the first issue I used the ActiveItem property of the xamgrid. I also found some samples that show you how to create a SelectedItems property for the xamgrid and those have been very helpful.
However I do not really have a solution for the second issue. I looked at your sample but it just uses code behind. I am trying to achieve my goal using the MVVM patter.