This question is locked. New answers and comments are not allowed.
Hi
First column of my data grid is a radio Button (used :GridViewDataColumn.CellStyle)..in front of every row in the grid now there is a Radio button
I want to achive following things using Silverlight DataGrid
1 ) Not let user to select multiple radio buttons, Currently user can select more than one radio button
2 ) Select a single row from the data grid having Radio button checked
3 ) Get the Row index of the row for which Radio button is checked
4) Pass the cell content of another couumn in the selected row
I am not sure how to do this in silverlight and using Telerik data gird
I would highly appreciate if any codesnippet can be provided? As I am very new to silverlight
A
<StackPanel Grid.Row="5" Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Left" > |
<twcgv:RadGridView x:Name="RadGridView1" |
IsReadOnly="True" |
RowIndicatorVisibility="Collapsed" |
AutoGenerateColumns="False" |
ColumnsWidthMode="Fill" |
CanUserFreezeColumns="False" |
ScrollMode="RealTime" |
UseAlternateRowStyle="True" |
MultipleSelect="False" |
> |
<twcgv:RadGridView.Columns > |
<twcgv:GridViewDataColumn HeaderText="Radio Button" DataType="{x:Null}" > |
<twcgv:GridViewDataColumn.CellStyle> |
<Style TargetType="colgrid:GridViewCell"> |
<Setter Property="Template"> |
<Setter.Value> |
<ControlTemplate TargetType="colgrid:GridViewCell"> |
<Border Margin="0,0,0,0" Padding="10" BorderBrush="DarkGray" BorderThickness="1" |
CornerRadius="0"> |
<y:RadioButton Name="CellRadioButton" GroupName="Group1" VerticalAlignment="Bottom" HorizontalAlignment="Left" Checked="RadioButton_Checked" /> |
</Border> |
</ControlTemplate> |
</Setter.Value> |
</Setter> |
</Style> |
</twcgv:GridViewDataColumn.CellStyle> |
</twcgv:GridViewDataColumn> |
<twcgv:GridViewDataColumn HeaderText="PO#" UniqueName="PONumber" /> |
<twcgv:GridViewDataColumn HeaderText="Vendor Name" UniqueName="VendorName" /> |
<twcgv:GridViewDataColumn HeaderText="Description" UniqueName="Description" /> |
<twcgv:GridViewDataColumn HeaderText="Requested Date" UniqueName="RequestedDate" /> |
<twcgv:GridViewDataColumn HeaderText="Plant Name" UniqueName="PlantName" /> |
</twcgv:RadGridView.Columns> |
</twcgv:RadGridView> |