Hi,
I am using telerik gridview control. I need to add checkboxes in all cells. When user clicks on the save button i need to know all checked checkboxes with column and row the selected checkbox is present.
Here is the code that i am using.
Thank you
Chetan
I am using telerik gridview control. I need to add checkboxes in all cells. When user clicks on the save button i need to know all checked checkboxes with column and row the selected checkbox is present.
Here is the code that i am using.
<
grid:RadGridView
x:Name
=
"gridview"
Grid.Row
=
"3"
Grid.Column
=
"0"
Grid.ColumnSpan
=
"4"
RowIndicatorVisibility
=
"Collapsed"
IsReadOnly
=
"True"
AutoGenerateColumns
=
"False"
CanUserFreezeColumns
=
"False"
CanUserResizeColumns
=
"False"
Width
=
"700"
>
<
grid:RadGridView.Columns
>
<
grid:GridViewDataColumn
x:Name
=
"hCol"
Header
=
"#"
HeaderTextAlignment
=
"Center"
Width
=
"150"
TextAlignment
=
"Center"
IsSortable
=
"False"
/>
<!--<
grid:GridViewDataColumn
x:Name
=
"hColumn"
Header
=
"Heading"
HeaderTextAlignment
=
"Center"
Width
=
"200"
>
<
grid:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
telerikInput:RadComboBox
x:Name
=
"cbM"
SelectedIndex
=
"0"
>
</
telerikInput:RadComboBox
>
</
DataTemplate
>
</
grid:GridViewDataColumn.CellTemplate
>
</
grid:GridViewDataColumn
>-->
<!--<
grid:GridViewDataColumn
x:Name
=
"cbG1"
Header
=
"G-1"
HeaderTextAlignment
=
"Center"
Width
=
"50"
>
<
grid:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
CheckBox
x:Name
=
"chkMeasures"
/>
</
DataTemplate
>
</
grid:GridViewDataColumn.CellTemplate
>
</
grid:GridViewDataColumn
>-->
<
grid:GridViewDataColumn
x:Name
=
"cbG1"
Header
=
"G-1"
IsSortable
=
"False"
TextAlignment
=
"Center"
HeaderTextAlignment
=
"Center"
>
<
grid:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
CheckBox
IsChecked
=
"false"
Click
=
"CheckBox_Click"
/>
</
DataTemplate
>
</
grid:GridViewDataColumn.CellTemplate
>
</
grid:GridViewDataColumn
>
<
grid:GridViewDataColumn
x:Name
=
"cbG2"
Header
=
"G-2"
IsSortable
=
"False"
TextAlignment
=
"Center"
HeaderTextAlignment
=
"Center"
>
<
grid:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
CheckBox
IsChecked
=
"false"
Checked
=
"CbChecked_Click"
/>
</
DataTemplate
>
</
grid:GridViewDataColumn.CellTemplate
>
</
grid:GridViewDataColumn
>
<
grid:GridViewDataColumn
x:Name
=
"cbG3"
Header
=
"G-3"
IsSortable
=
"False"
HeaderTextAlignment
=
"Center"
>
<
grid:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
CheckBox
IsChecked
=
"false"
/>
</
DataTemplate
>
</
grid:GridViewDataColumn.CellTemplate
>
</
grid:GridViewDataColumn
>
<
grid:GridViewDataColumn
x:Name
=
"cbG4"
Header
=
"G-4"
IsSortable
=
"False"
HeaderTextAlignment
=
"Center"
>
<
grid:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
CheckBox
IsChecked
=
"false"
/>
</
DataTemplate
>
</
grid:GridViewDataColumn.CellTemplate
>
</
grid:GridViewDataColumn
>
<
grid:GridViewDataColumn
x:Name
=
"cbG5"
Header
=
"G-5"
IsSortable
=
"False"
HeaderTextAlignment
=
"Center"
>
<
grid:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
CheckBox
IsChecked
=
"false"
/>
</
DataTemplate
>
</
grid:GridViewDataColumn.CellTemplate
>
</
grid:GridViewDataColumn
>
<
grid:GridViewDataColumn
x:Name
=
"cbG6"
Header
=
"G-6"
IsSortable
=
"False"
HeaderTextAlignment
=
"Center"
>
<
grid:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
CheckBox
IsChecked
=
"false"
/>
</
DataTemplate
>
</
grid:GridViewDataColumn.CellTemplate
>
</
grid:GridViewDataColumn
>
<
grid:GridViewDataColumn
x:Name
=
"cbG7"
Header
=
"G-7"
IsSortable
=
"False"
HeaderTextAlignment
=
"Center"
>
<
grid:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
CheckBox
IsChecked
=
"false"
/>
</
DataTemplate
>
</
grid:GridViewDataColumn.CellTemplate
>
</
grid:GridViewDataColumn
>
<
grid:GridViewDataColumn
x:Name
=
"cbG8"
Header
=
"G-8"
IsSortable
=
"False"
HeaderTextAlignment
=
"Center"
>
<
grid:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
CheckBox
IsChecked
=
"false"
/>
</
DataTemplate
>
</
grid:GridViewDataColumn.CellTemplate
>
</
grid:GridViewDataColumn
>
<!--<
grid:GridViewCheckBoxColumn
Header
=
"Check box"
>
<
grid:GridViewCheckBoxColumn.CellTemplate
>
<
CheckBox
IsChecked
=
"false"
/>
</
grid:GridViewCheckBoxColumn.CellTemplate
>
</
grid:GridViewCheckBoxColumn
>-->
</
grid:RadGridView.Columns
>
</
grid:RadGridView
>
Thank you
Chetan