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

[Solved] Grid OnSave event fires even though the data has model error

0 Answers 14 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
ashok varma
Top achievements
Rank 1
ashok varma asked on 20 Mar 2012, 12:08 PM
Telerik team,

I have a grid with ajax binding along with edit option. Now one of the property named 'PropX' in the model that is bounded to the grid has a Required Field model validation(using validation attributes at model level).
when PropX is edited and left the text box empty and i clicked on update

Expected Result : model error should appear and OnSave event shouldn't be fired(i.e., Update should be cancelled).

Actual Result : In IE8 model error is shown as well as the OnSave event is fired and getting updated with default value.

i can able to reproduce this in your online demo at http://demos.telerik.com/aspnet-mvc/razor/grid/clientsideevents
How to reproduce this in your online demo : open the above mention url in IE8, edit one of the row and delete if there is any value in "Unit Price"  (or) "Units in stock" text boxes and click on update. you can see model error is shown and update is also done.

This is not reproducible in mozilla.

I need a solution for this ASAP.

Thanks,
Ashok
Tags
Grid
Asked by
ashok varma
Top achievements
Rank 1
Share this question
or