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

Validation in the ASP.NET MVC Grid

7 Answers 220 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Reza
Top achievements
Rank 1
Reza asked on 22 Jul 2010, 08:06 PM
Hello,

I'm using the Grid component and following the example "Grid->Editing->Ajax Editing". It seems in edit mode the validation that set by DataAnnotation attributes on the model are in effect by highlighting the input box and showing the error message. I like to use this feature , however I'm not able to locate the area that validation is enabled in the explaining tabs below the demo!!

Please advice.

Thanks,
Reza


7 Answers, 1 is accepted

Sort by
0
Prathamesh
Top achievements
Rank 1
answered on 14 Apr 2011, 04:26 PM
Hi all,
          I am facing the same problem. Does anybody have any idea? I am also following the example "Grid->Editing->Ajax Editing". Please, give me link or demo project which uses DataAnnotation  for client side validation while using Ajax binding to the Grid.

Thanks in advance.
0
alonav
Top achievements
Rank 1
answered on 13 Jun 2011, 09:18 AM
Hello
Same!!!!
0
Atanas Korchev
Telerik team
answered on 13 Jun 2011, 09:25 AM
Hi,

 I am not sure what the problem is. The first post in this thread does not report any problem apart from being unable to find the code for the model. Then there are two posts telling they have the same "problem". Could you clarify what the problem is?

 In our example the Model is shown in the code viewer - in the "EditableProduct(model)" tab.

Regards,
Atanas Korchev
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
IT
Top achievements
Rank 1
answered on 15 Aug 2011, 04:58 AM
I believe what he means is that it's not clear from the demo how to enable the validation...

I tried to enable validation as per http://demos.telerik.com/aspnet-mvc/razor/grid/editingbatch but couldn't get it working either.

I discovered after trial and error that it was because I had ".jQuery(false)" where I call ScriptRegistrar... I had this because it conflicts with something else I'm using.

Is this expected and is there a way to have validation work without the telerik jQuery reference?


0
IT
Top achievements
Rank 1
answered on 15 Aug 2011, 07:54 AM
I believe what he means is that it's not clear from the demo how to enable the validation...

I tried to enable validation as per http://demos.telerik.com/aspnet-mvc/razor/grid/editingbatch but couldn't get it working either.

I discovered after trial and error that it was because I had ".jQuery(false)" where I call ScriptRegistrar... I had this because it conflicts with something else I'm using.

Is this expected and is there a way to have validation work without the telerik jQuery reference?
0
Atanas Korchev
Telerik team
answered on 15 Aug 2011, 08:02 AM
Hi Aleks,

The validation is always enabled. The grid needs jquery.validate.js and jquery.js to be included in order to work properly. The complete list of required JavaScript files is available here.

Regards,
Atanas Korchev
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
Milin
Top achievements
Rank 1
answered on 28 Sep 2012, 07:41 AM
Hi telerik Team,
I have face the problem regarding the Validation in MVC grid.
My Problem is
1.If i Change the order in columns my Validation is not working means i put the command button first then column is bound in that case my Validation is not working...Please help me.
Tags
General Discussions
Asked by
Reza
Top achievements
Rank 1
Answers by
Prathamesh
Top achievements
Rank 1
alonav
Top achievements
Rank 1
Atanas Korchev
Telerik team
IT
Top achievements
Rank 1
Milin
Top achievements
Rank 1
Share this question
or