Hi,
I would like display the editing controls for all of the columns in a GridViewRow when the GridViewRow is in edit mode.
I have tried handling the RadGridView's BeginningEdit, PreparedCellForEdit, and PrepairingCellFor events to set every cell's InEditMode=True; however, it only ever shows one cell in edit mode.
For example, it seems like the following accomplishes nothing at any point in the edit life cycle for the RadGridView:
I also tried using DataTriggers on the GridViewCell to accomplish this like so:
This sets the foreground for all of the cells in the row when the row is in edit mode, however only 1 cell displays the edit controls even though I have set the IsInEditMode to true for every cell if the row is in edit mode. Not only that, but the cell that is displaying the controls for editing isn't the one that I double clicked on, but is the cell to the right of it.
I have tried a few other approaches but none of them have been successful.
I look forward to hearing back to you on how to accomplish this.
Thank you,
-Rebecca
I would like display the editing controls for all of the columns in a GridViewRow when the GridViewRow is in edit mode.
I have tried handling the RadGridView's BeginningEdit, PreparedCellForEdit, and PrepairingCellFor events to set every cell's InEditMode=True; however, it only ever shows one cell in edit mode.
For example, it seems like the following accomplishes nothing at any point in the edit life cycle for the RadGridView:
Dim
row
As
Telerik.Windows.Controls.GridView.GridViewRow =
DirectCast
(e.Row, Telerik.Windows.Controls.GridView.GridViewRow)
For
Each
cell
As
Telerik.Windows.Controls.GridView.GridViewCell
In
row.Cells
If
Object
.Equals(cell.Column, e.Column) = False
Then
cell.IsInEditMode =
True
End
If
Next
I also tried using DataTriggers on the GridViewCell to accomplish this like so:
<
Style
TargetType
=
"telerik:GridViewCell"
>
<
Style.Triggers
>
<
DataTrigger
Binding
=
"{Binding Path=IsInEditMode, RelativeSource={RelativeSource AncestorType={x:Type telerik:GridViewRow}}}"
Value
=
"True"
>
<
Setter
Property
=
"Foreground"
Value
=
"Aqua"
/>
<
Setter
Property
=
"IsInEditMode"
Value
=
"True"
/>
</
DataTrigger
>
</
Style.Triggers
>
</
Style
>
This sets the foreground for all of the cells in the row when the row is in edit mode, however only 1 cell displays the edit controls even though I have set the IsInEditMode to true for every cell if the row is in edit mode. Not only that, but the cell that is displaying the controls for editing isn't the one that I double clicked on, but is the cell to the right of it.
I have tried a few other approaches but none of them have been successful.
I look forward to hearing back to you on how to accomplish this.
Thank you,
-Rebecca