Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Hi

                                    I have a project which has model validation using the data annotation ([Required] etc.) in my class and uses unobtrusive validation to do client side validation.

                                    I like the DateEdit control you offer When I change TO

                                    @Html.DevExpress().DateEdit(settings =>
                                    {
                                    settings.Name = "ClientFund.StartDate";
                                    settings.Properties.NullText = "MM/dd/yyyy";
                                    settings.Properties.EditFormat = EditFormat.Custom;
                                    settings.Properties.EditFormatString = "MM/dd/yyyy";
                                    }).GetHtml()

                                    FROM

                                    @Html.EditorFor(model => model.ClientFund.StartDate, "NullableDateTime")

                                    My clientside validation stops working. is there big changes involved in order to get this to function as it was before using the dateEdit control?

                                    I have attached a screen shot below of how it use to work.

                                    I have tried to follow your example but not having any luck. Hope to get all this working so can propose the functionality to managers to possibly buy a license.


                                    Your help is very much appreciated.

                                    Thanks

                                jquery cal..png
                                • Joskan Mus 02.08.2013

                                  here is part of my model

                                You must  log in  or  register  to leave comments

                                1 Solution

                                0

                                Hi Joskas,

                                Thank you for contacting us. To solve the problem, set the DateEditSettings.ShowModelErrors property to true and bind your extension to your model as shown below:

                                	
                                [C#]
                                @Html.DevExpress().DateEdit(settings => { settings.Name = "ClientFund.StartDate"; settings.Properties.NullText = "MM/dd/yyyy"; settings.Properties.EditFormat = EditFormat.Custom; settings. ShowModelErrors = true; settings.Properties.EditFormatString = "MM/dd/yyyy"; }).Bind(Model.ClientFund.StartDate).GetHtml()
                                • Joskan Mus 02.11.2013

                                  Thank you for your reply.

                                  As you can see from the attached - the validation is not showing up.

                                  I have also tried what you have suggested.

                                • Anthony (DevExpress Support) 02.11.2013

                                  Hello,

                                  It is hard to determine the cause of this issue without a sample. Would you please attach a sample project that illustrates this issue in action?
                                  Also, please note that since you use the 12.2.6 DXperience version, it is possible to use the DateEditFor method:

                                  @Html.DevExpress().DateEditFor(m => m.ClientFund.StartDate, settings => {
                                  settings.ShowModelErrors = true;
                                  ...
                                  }).GetHtml()
                                  
                                  Would you please try it and see if the issue persists?

                                • Joskan Mus 02.11.2013

                                  I have attached a sample project demonstrating my problem.

                                  It seems to be working on this project for some reason.

                                  It just is not working with unobtrusive client side. If it is working on this sample app - what could my issue be on my actual project?

                                • Anthony (DevExpress Support) 02.12.2013

                                  It is hard to determine without an actual project. Please make sure that validation scripts are enabled. See Unobtrusive Client Validation for more information.

                                You must  log in  or  register  to leave comments

                                To start a chat you should create a support ticket


                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners