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

Bind Radbutton in RadGridView to Icommand

1 Answer 175 Views
GridView
This is a migrated thread and some comments may be shown as answers.
crazy05
Top achievements
Rank 1
crazy05 asked on 08 May 2015, 07:37 PM

Here is my Code. Can I use GridViewcolumn and datatemplate for this ? I want Radbutton in every row. Once I click on that button, I want to pass the row details to ICommand. How can I do this ? 

<telerik:GridViewColumn Width="100">
          <telerik:GridViewColumn.CellTemplate>
                  <DataTemplate>
                                    
                     </DataTemplate>
                 </telerik:GridViewColumn.CellTemplate>
       </telerik:GridViewColumn>

 

  public ICommand ShowCommand
        {
            get
            {
                return new RelayCommand(this.ShowDetails);
            }
        }

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 11 May 2015, 08:14 AM
Hello,

As to commands used in GridViewColumn, you can check the Commands WPF Demo and EventToCommandBehavior documentation.

Please note the DataContext of RowDetails is the bound data item. Therefore you can pass it as a CommandParameter.

You can also check the following resources for more information:
Commanding Overview
Command Binding with Parameter Passing.

Regards,
Dimitrina
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
GridView
Asked by
crazy05
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or