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

EnableValidation="false" is not working as intended.

5 Answers 36 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mohammed Ahmed
Top achievements
Rank 1
Mohammed Ahmed asked on 26 May 2010, 10:33 PM

If you have validation controls and RadGrid in the same page, when you are trying to add a new record using the RadGrid Insert command the other control in the same form will fire validation. To solve this issue use this setting in your RadGrid

 

<ValidationSettings EnableValidation="false" CommandsToValidate="NO" ValidationGroup="no" />

 

Basically I am tricking the RadGrid control by passing bogus string to CommandToValidate and ValidationGroup in addition to EnabelValidation should be set to false.

 

I believe this a bug in telerik control but they claim the problem is fixed.


My version is 2009.3.1407.35
 

Thanks

Mohammed

5 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 27 May 2010, 07:54 AM
Hello Mohammed,

When there are no validation groups set all controls will be validate on attempt to postback. If you need validation specific region of control you must set ValidationGroup.

Regards,
Nikolay
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
Mohammed Ahmed
Top achievements
Rank 1
answered on 27 May 2010, 02:28 PM

I don't need to define ValidationGroup to make it work this way.

In my opinion it is pure telerik bug. if you want idea how to fix this here is my suggestion:

The ValidationGroup and CommandToValidate should be defaulted to VALIDATION_NOT_SET string if the user want to turn off any validation in the RadGrid in addition to EnableValidation=false. This kind of logic can be embedded within one property such as TurnOffRadGridValidation=false or some thing similar.

These conditions should be documented in the validation section of the Demo so that people will get answer quickly.



Thanks
--Mohammed
0
Nikolay Rusev
Telerik team
answered on 01 Jun 2010, 04:41 PM
Hello Mohammed,

Actually RadGrid behavior is consistent with any other ASP.NET Control. ValidationGroup property by default is empty.

You can play with any other group of controls in same-default validation group and behavior that you will experience will quite the same.

Best wishes,
Nikolay
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
Mohammed Ahmed
Top achievements
Rank 1
answered on 01 Jun 2010, 06:09 PM

I think as this point if any body has similar problem the above solution can work as a workaround. It will be nice if telerik fix the code not to enforce users to use Validation Group. It should be enough to turn off the control from triggering validation. Currently if you live the ValidationGroup empty in the RadGrid it will cause the other validation control to fire when there is a postback.



Thanks
0
Chamin
Top achievements
Rank 1
answered on 14 Jun 2012, 10:14 AM
Hi Mohamad,

I can't solve my issue by applying your workaround.
RadGrid  fires validation even I set the validation Group. This is totally mess for me....
Tags
Grid
Asked by
Mohammed Ahmed
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Mohammed Ahmed
Top achievements
Rank 1
Chamin
Top achievements
Rank 1
Share this question
or