I am quite new to all of this, so it maybe no surprise that I would be a little lost...
Here is where I am at: I would like to get the CustomerID (from a viewModel) when a row is selected, to pass it to anotherViewModel to filter orders matching the currently selected Customer.
in XAML I have:
In the viewModel, I have a delegate command.
I have been following the example in the documentation about RadEventsToCommandExamples, and when I look in the debugger, I can see that my Object is of type Telerik.Windows.Controls.SelectionChangeEventsArgs, but if I try to cast the Object to this, I get an error, as it find Windows.Controls.SelectionChangedEventsArgs (note the difference between change and changed).
I did try to cast it from RadRoutedEventArgs, but I am not too sure how to do.
How should I do? Looks like a bug to me, but I would really like to know about a work around. Thanks in advance!
Bernard
Here is where I am at: I would like to get the CustomerID (from a viewModel) when a row is selected, to pass it to anotherViewModel to filter orders matching the currently selected Customer.
in XAML I have:
<telerik:RadGridView x:Name="CustomersGrid" IsReadOnly="true" ItemsSource="{Binding CustomersList, Mode=TwoWay}" CanUserFreezeColumns="False" RowIndicatorVisibility="Collapsed" AutoGenerateColumns="False"> <i:Interaction.Triggers> <i:EventTrigger EventName="SelectionChanged" > <Command:EventToCommand Command="{Binding SelectCustomer}" PassEventArgsToCommand="True" /> <!--<Command:EventToCommand CommandParameter="{Binding SelectedItem, ElementName=CustomersGrid}" Command="{Binding SelectCustomer, Mode=OneWay}" /> --> </i:EventTrigger> </i:Interaction.Triggers>In the viewModel, I have a delegate command.
I have been following the example in the documentation about RadEventsToCommandExamples, and when I look in the debugger, I can see that my Object is of type Telerik.Windows.Controls.SelectionChangeEventsArgs, but if I try to cast the Object to this, I get an error, as it find Windows.Controls.SelectionChangedEventsArgs (note the difference between change and changed).
I did try to cast it from RadRoutedEventArgs, but I am not too sure how to do.
How should I do? Looks like a bug to me, but I would really like to know about a work around. Thanks in advance!
Bernard