Hi,
I have a gridview using the </gridView:RadGridView.RowDetailsTemplate> to display finer details about the item in the grid row. This works fine. inside this template I also have a button which has an attached command:
<Button Margin="2,2,2,2" Padding="5,5,5,5" Style="{DynamicResource SimpleButton}" HorizontalAlignment="Stretch" VerticalAlignment="Bottom"
x:Name="DeleteTaskButton" FontWeight="Normal" Foreground="#505050" FontSize="14" FontFamily="Corbel"
Content="Delete Task Schedule"
commands:Click.Command="{Binding DeleteTaskCommand}"
commands:Click.CommandParameter="{Binding Id}"/>
Here I can pass the Id of the Item to my backing ViewModel and remove from the collection. However, this currently doesn't work because the DelegateCommand is part of the ViewModel NOT the object being rendered by the DataTemplate. Obviously I could add the command to the object but I don't like it as it gets quite messy, my base object has already had INotifyPropertyChanged added to it. Ideally what I would like is a way have the button command in my ViewModel picking up the command from the DataTemplate, and also if possible I would like to be able to retrieve the SelectedIndex of the GridView.
Thanks, Mark