I have to points here about Batch Editing no Grid.
1) When I'm editing some entity, fill every fields in Grid and send to Server, whether I have some internal business validation and for some reason some field has an error, when the server sends the results to Grid, nothing happens, no message, no alert... but the error information are in JSON data. Is this a bug? Or I made something wrong?
2) When I'm inserting some new entity on Grid and the field has no default value all the columns will be empty, and if I click on save, no validation will appear and the grid will call the server. And yes, I put the [Required] attribute on all fields. Is this a bug? Or I made something wrong?
If you need more information about it, just ask me.
Thanks
Guilherme Moschen
7 Answers, 1 is accepted
Indeed, this is expected behavior. Due to the way batch editing functionality works there will be no validators available in which the errors to be shown when a validation errors occurs when changes are submitted . Therefore, in order to handle validation errors you should use grid's onError event. Such approach is demonstrated in this online demo.
Kind regards,Rosen
the Telerik team
Building my application I found another bug, regarding Batch Editing. This happens in Telerik Demo page as well.
Fallow the steps:
- Access http://demos.telerik.com/aspnet-mvc/grid/editingbatch
- Click on 'Add new Record '
- Click on 'Delete ' on newer row
- Click on 'Save Changes'
- Walla!
Do you guys have a forecast when this bug will be fixed?
Thanks!
Guilherme Moschen
I also need to fix this bug. Any Idea?
Thanks
I was able to observe the behavior you have described. However, I'm happy to inform you that we have addressed it and I have attached an internal build which contains the fix.
All the best,Rosen
the Telerik team
I'm also experiencing issue #2 in Guilherme's original post regarding the validators not working for the insert row. For the edit rows, the validators for both regular textboxes and dropdown lists (a user control editor containing Telerik's DropDownList) work fine. For the insert row however, the validators for the textboxes work but the ones for the dropdown lists don't. Is this the expected behavior that was mentioned previously. If not, is it part of this internal build?
Let me know if you need a sample project to reproduce the behavior. Thanks a lot!
Ben
After the last release a set of bugs was solved but I still with some issues.
Bug 1
- Access http://demos.telerik.com/aspnet-mvc/grid/editingbatch?theme=vista
- Add a new record
- Delete the newer record
- Try to add a new record
Bug 2
Same way of Bug 1 but I tested the local example from download. Telerik_Extensions_for_ASPNET_MVC_2011_1_414_Dev.msi
The difference is with you try to save instead of add, the validation message is showed on screen.
The way I used to solve these bugs is when delete the newer record, just clear the insert information of change log.
grid.changeLog.inserted = [];
I hope this could help you guys.
Thanks
I was able to recreate the issues you have described and we have managed to address them. The fix will be available with the next internal build. Meanwhile, I have attached a modified version of grid.editing.min.js file, please replace yours with it. Also your telerik points has been updated.
Regards,Rosen
the Telerik team