This question is locked. New answers and comments are not allowed.
Hello,
I would like to ask why GridView is handling ESC key in ReadOnly mode. I have it used in RadWindow and RadButton with telerik:RadWindow.ResponseButton="Cancel" set.
Problem is that ESC key is handled by GridView and never processed by RadWindow.
my structure of xaml:
I have found found workaround with CustomKeyboardCommandProvider but I think it is not usuall grid behavior.
Should I set my CustomKeyboardCommandProvider in every grid in every RadWindow?
Thank you for your response
misa
I would like to ask why GridView is handling ESC key in ReadOnly mode. I have it used in RadWindow and RadButton with telerik:RadWindow.ResponseButton="Cancel" set.
Problem is that ESC key is handled by GridView and never processed by RadWindow.
my structure of xaml:
<
telerik:RadWindow
x:Name
=
"SampleDetail"
Header="{Binding Strings.SampleDetail,
Source={StaticResource Resources}}"
WindowStartupLocation
=
"CenterOwner"
Padding
=
"10"
>
<
telerik:RadGridView
x:Name
=
"gridRequests"
Style
=
"{StaticResource GridStyle}"
ItemsSource="
{Binding Requests.RequestsGridSource}"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
IsFilteringAllowed
=
"False"
AutoGenerateColumns
=
"False"
Height
=
"450"
IsReadOnly
=
"True"
SelectionMode
=
"Single"
>
... columns
</
telerik:RadGridView
>
<
telerik:RadButton
x:Name
=
"buDetailClose"
Click
=
"buDetailClose_Click"
Content
=
"{Binding Strings.Close, Source={StaticResource Resources}}"
Margin
=
"5"
telerik:RadWindow.ResponseButton
=
"Cancel"
/>
</
telerik:RadWindow
>
I have found found workaround with CustomKeyboardCommandProvider but I think it is not usuall grid behavior.
public
override
IEnumerable<ICommand> ProvideCommandsForKey(Key key)
{
List<ICommand> commandsToExecute =
base
.ProvideCommandsForKey(key).ToList();
if
(key == Key.Escape)
{
commandsToExecute.Remove(RadGridViewCommands.CancelCellEdit);
}
return
commandsToExecute;
}
Should I set my CustomKeyboardCommandProvider in every grid in every RadWindow?
Thank you for your response
misa