I want to use ASP.NET's native validation inside my ASPxGridView's edit form template. I do not want to use DevEx's validation, but instead have standard ASP.NET validators in the edit form that report to a validation summary within the template. Can anyone point me in the right direction with this? Thanks.
2 Answers
Have a look at this in Devexpress' forum:
http://community.devexpress.com/forums/p/67285/228991.aspx
According to this, "Standard ASP.NET validators do not support callbacks. Fortunately, controls of the ASPxEditors suite have their own validation mechanism." So it seems like the standard ASP.NET validators will not work.

- 1,226
- 12
- 23
-
1This was my findings when I dove into this issue as well. I ended up biting the bullet and doing the devex validation method. I cant explain my passion for how much I loathe devex controls. – Etch Nov 17 '11 at 14:06
-
@Etch: Why do you dislike these controls? Have you ever tried to contact DX guys regarding this? – Mikhail Nov 17 '11 at 19:24
-
@MikhailPreyskurantov This is a perfect example of things you get into. Say I already have a page, in normal .NET controls with .NET validation and I want to introduce a DevEx control to the page because it does just want I need. I have to either 1 not use the devex control or change all my controls to devEx and use devEx validation. This is one of the many reasons why my group at work is doing away with the DevEx toolset next rewrite. I actually like their windows controls but really dont like the web toolkit. And yes we have created tickets with DX. – Etch Nov 17 '11 at 20:07
-
Just now getting back to this. There has to be a way to put a validation summary and a few validators that report to it inside the same edit form template. Then assign a Javascript onclick function to the update button that calls `Page_ClientValidate("ValidationGroup")`. If it passes, client script calls MyGrid.UpdateEdit(). Otherwise, the validation summary is shown. – oscilatingcretin Nov 23 '11 at 12:28
-
@Etch: I join you in your loathing for DevEx. It is absolutely the most non-intuitive third-party API I have ever used. I would honestly rather use Component Art over this. I really, REALLY miss Telerik. – oscilatingcretin Nov 23 '11 at 18:54
By default, the DevExpress ASPxGridView control works via AJAX callbacks.
Standard ASP.NET validators do not work properly inside callback-based containers:
http://www.aspnettricks.com/archives/validators-inside-update-panel-doesnt-work-properly/
http://www.devexpress.com/issue=Q274114
It is possible to switch the ASPxGridView control to a standard postback mode.
Just set the ASPxGridView.EnableCallBack http://documentation.devexpress.com/#AspNet/DevExpressWebASPxGridViewASPxGridView_EnableCallBackstopic property to “false”.
However, (I think) it is better to use built-in DevExpress ASPxEditors validation. You can always get assistance from the DX team.

- 9,186
- 4
- 33
- 49