Hi !
I'm writing this because I can't find a solution to my problem on other threads, on documentation or by myself...
I'm using a radGridView to display data with radButtons in each rows of my grid. I want to trigger actions when buttons are clicked (this part is working). But When I click a button, the selected row doesn't change and the action is applied to an other item if I don't pre-select the corresponding row.
I've been trying unsuccessfully two ways of resolving this :
- Change the current selected item by clicking on the radButton (and not only on the row).
- Disable my buttons and enabling only those of the selected row.
Here is my radGridView definition
I'm writing this because I can't find a solution to my problem on other threads, on documentation or by myself...
I'm using a radGridView to display data with radButtons in each rows of my grid. I want to trigger actions when buttons are clicked (this part is working). But When I click a button, the selected row doesn't change and the action is applied to an other item if I don't pre-select the corresponding row.
I've been trying unsuccessfully two ways of resolving this :
- Change the current selected item by clicking on the radButton (and not only on the row).
- Disable my buttons and enabling only those of the selected row.
Here is my radGridView definition
<
telerik:RadGridView
SelectionMode
=
"Extended"
ShowGroupPanel
=
"False"
HorizontalAlignment
=
"Left"
Margin
=
"0,35,0,0"
Name
=
"employeeGrid"
VerticalAlignment
=
"Top"
Height
=
"554"
Width
=
"1012"
AutoGenerateColumns
=
"False"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding name}"
Header
=
"Name"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding hoursWorked}"
Header
=
"Hours worked"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding absenteism}"
Header
=
"Absenteism"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding extraHours}"
Header
=
"Extra hours"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding timeChecked}"
Header
=
"Checked"
/>
<
telerik:GridViewColumn
Width
=
"75"
>
<
telerik:GridViewColumn.CellTemplate
>
<
DataTemplate
>
<
telerik:RadButton
Content
=
"Accept"
Name
=
"bAccept"
Click
=
"bAccept_Click"
/>
</
DataTemplate
>
</
telerik:GridViewColumn.CellTemplate
>
</
telerik:GridViewColumn
>
<
telerik:GridViewColumn
Width
=
"75"
>
<
telerik:GridViewColumn.CellTemplate
>
<
DataTemplate
>
<
telerik:RadButton
Content
=
"Details"
Name
=
"bDetails"
Click
=
"bDetails_Click"
/>
</
DataTemplate
>
</
telerik:GridViewColumn.CellTemplate
>
</
telerik:GridViewColumn
>
<
telerik:GridViewColumn
Width
=
"75"
>
<
telerik:GridViewColumn.CellTemplate
>
<
DataTemplate
>
<
telerik:RadButton
Content
=
"Refuse"
Name
=
"bRefuse"
Click
=
"bRefuse_Click"
/>
</
DataTemplate
>
</
telerik:GridViewColumn.CellTemplate
>
</
telerik:GridViewColumn
>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
If one of my solutions is viable or if the problem can be solved in another way, I'd be glad to know it.
Thanks in advance.