I have a grid where the first column is "Region"
When I create a new row I want to ensure that the user can specify the value for "Region" only once. After that I want the cell to be readonly. The region is selected from a control which is specified in the CellEditTemplate. The CellTemplate simply contains a TextBlock
The GridViewDataColumn has the IsReadOnlyBinding property bound to a property on the row object called "RegionIsDefined". I set this to true once the region is selected. Unfortunately this does not make the cell readonly (it still has focus and is in edit mode).
How should I inform the view that I have finished selecting the Region with the CellEditTemplate control?
- should I lose focus on the column?
- is there a cell editing ended event I can call?
Many thanks
When I create a new row I want to ensure that the user can specify the value for "Region" only once. After that I want the cell to be readonly. The region is selected from a control which is specified in the CellEditTemplate. The CellTemplate simply contains a TextBlock
The GridViewDataColumn has the IsReadOnlyBinding property bound to a property on the row object called "RegionIsDefined". I set this to true once the region is selected. Unfortunately this does not make the cell readonly (it still has focus and is in edit mode).
How should I inform the view that I have finished selecting the Region with the CellEditTemplate control?
- should I lose focus on the column?
- is there a cell editing ended event I can call?
<
telerik:GridViewDataColumn
IsReadOnlyBinding
=
"{Binding RegionIsDefined}"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Name}"
/>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
<
telerik:GridViewDataColumn.CellEditTemplate
>
<
DataTemplate
>
<
myRegionControl
>
...
</
myRegionControl
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellEditTemplate
>
</
telerik:GridViewDataColumn
>
Many thanks