This is a migrated thread and some comments may be shown as answers.

[Solved] RadGridView row commands

1 Answer 128 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Berwyn
Top achievements
Rank 1
Berwyn asked on 05 Oct 2010, 05:01 PM
Is it possible for commands to be attached to row selections? This would then be listened for in the viewmodel. What I need to do is when a user clicks a row then navigate to a different page, based on an item in the row selected. I'd rather not have a button column in the grid as its already a very wide grid.

Thanks

E.g. something like:

<

 

 

telerik:RadGridView x:Name="grid" ItemsSource="{Binding vmProperty}" AutoGenerateColumns="False"

 

 

 

IsReadOnly="True" SelectionUnit="FullRow"

local

 

 

:GridViewSelectedIndexChanged.Command="{Binding gridSelectedRowChanged}"

 

 

 

local:GridViewSelectedIndexChanged.CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=SelectedItem}"
>

 

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 06 Oct 2010, 03:27 PM
Hello Berwyn,

RadGridView provides SelectionChanged event that is fired once a new row is selected. Thus it may satisfy your requirements without the need to create and invoke a command.
However, if that does not correspond to your necessities, I would need more details about the purpose of using a command and your exact project settings. Thus I would be able to provide with a more appropriate solution.

Kind regards,
Maya
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Berwyn
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or