This is a migrated thread and some comments may be shown as answers.

Editable grid with validations

3 Answers 76 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sirisha Peyyeti
Top achievements
Rank 1
Sirisha Peyyeti asked on 11 May 2011, 03:38 PM

In editable grid, how do we handle the validations? We need to show the cursor back to the cell?

Requirement:

Assume that we need to display 3 columns in the Grid and one of the columns is required field. When user enters the blank data in edit mode in the required filed, then application needs to show an  alert message and cursor back in the cell. User can able to navigate on any of the other operations in the form like logout or switching to other form, other than Grid operations.

Please provide with sample code.

Thank You,

3 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 11 May 2011, 03:45 PM
Hi Sirisha Peyyeti,

You may run through our online documentation - both considering the validation and the validating events. Furthermore, you may take a look at our demos on the same topic. I believe those sources would be quite helpful for achieving the scenario you require.

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
Sirisha Peyyeti
Top achievements
Rank 1
answered on 11 May 2011, 04:35 PM
Hi,

We have gone through the demos and the  validations is working fine, but user cannot able to perform any action in the form.
we need the solution like validating with in the grid and we will not allow  the user to perform any action in the Grid, but he can able to perform any of the actions in the Form (Out of the grid) in such a case we need to show the confirmation to the user. And based on confirmation user proceed next action.

Thank You,
0
Maya
Telerik team
answered on 11 May 2011, 05:43 PM
Hi Sirisha Peyyeti,


Indeed, when the validation fails, the corresponding cell keeps the focus. If you try to move it away, a CommitEdit is executed, the validation fails again and the focus stays on that cell. If you want to overcome this, you may set the ActionOnLostFocus property of the grid:

<telerik:RadGridViewx:Name="RadGridView1"  ActionOnLostFocus="None">

Thus when the focus is moved, CommitEdit will not be executed.


Kind regards,
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
Tags
GridView
Asked by
Sirisha Peyyeti
Top achievements
Rank 1
Answers by
Maya
Telerik team
Sirisha Peyyeti
Top achievements
Rank 1
Share this question
or