Hi,
I have a RadGridView in which the user can edit cells and the content is validated.
The problem is that when an error occour the cell remain in edit mode until the input is validated again.
I would like that the user can add invalid input. Is it possible?
Thanks,
Roberto.
I have a RadGridView in which the user can edit cells and the content is validated.
The problem is that when an error occour the cell remain in edit mode until the input is validated again.
I would like that the user can add invalid input. Is it possible?
Thanks,
Roberto.
4 Answers, 1 is accepted
0
Hi Roberto,
Maya
the Telerik team
In order to exit from the "error" state, you may just press twice the Esc button. However, if you do not want the validation to fire, you handle the validating events of the grid. You may find more information about Validation in our online documentation.
Maya
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0

Steve Evans
Top achievements
Rank 1
answered on 14 Oct 2010, 02:54 PM
Hi,
I have a scenario where I present the user with a dialogue comprising: ok, cancel and a grid into which some data is required to be entered. In the scenario in which there is invalid data in a cell the cancel button can NOT be clicked and by that I mean that the only event that gets seems to get fired is the cellvalidating event.
I want the user to be able to cancel irrespective of whether the grid has valid or invalid data in it.
Please advise.
Thanks, Steve
I have a scenario where I present the user with a dialogue comprising: ok, cancel and a grid into which some data is required to be entered. In the scenario in which there is invalid data in a cell the cancel button can NOT be clicked and by that I mean that the only event that gets seems to get fired is the cellvalidating event.
I want the user to be able to cancel irrespective of whether the grid has valid or invalid data in it.
Please advise.
Thanks, Steve
0
Hello Steve Evans,
2. Set the Property of RadGridView ActionOnLostFocus:
The second steps is necessary as the default behavior of the grid on LostFocus is to commit edit
Greetings,
Maya
the Telerik team
In order to meet your requirements for cancelling even an invalid value, you may implement the following logic:
1. Define a RadButton:
<
telerik:RadButton
Content
=
"Cancel"
Command
=
"telerik:RadGridViewCommands.CancelRowEdit"
CommandTarget
=
"{Binding ElementName=clubsGrid}"
/>
2. Set the Property of RadGridView ActionOnLostFocus:
<
telerik:RadGridView
Name
=
"clubsGrid"
RowValidating
=
"clubsGrid_RowValidating"
ActionOnLostFocus
=
"None"
ItemsSource
=
"{Binding Clubs}"
AutoGenerateColumns
=
"False"
>
The second steps is necessary as the default behavior of the grid on LostFocus is to commit edit
Greetings,
Maya
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0

Steve Evans
Top achievements
Rank 1
answered on 15 Oct 2010, 02:42 PM
Just what I needed. Thank you very much.
Steve
Steve