Hi,
I need to bind model data to DatePicker control in ASP.NET MVC3 application.
In the examples I dont' find anything about this.
Could anyone help me?
Thank you in advance.
Mirko
Hello.
I am facing the same problem. and I Think your post is really useful, BUTI don't have the following package:
Infragistics.Web.Core.Framework.Mvc
How can I install/able that package?
Recently, we have bought the license for NetAdvantage 2011.1 Ultimate Version.
I have installed all the products, but I don't see the MVC Component.
Is there a way to install it? or my installation is not completed yet?
Thanks in advance
Hi Angel,
your response was really helpful.
This is exactly what I need.
Thank you!!!
Hi Mirko,
Thank you for your interest in our new jQuery product.
You can look at Editors -> Order Entry Form Sample at http://samples.infragistics.com/jquery/editors/order-entry-form. There you can see how you can use the MVC model binding with the editors helpers.
Look through the different files in the SELECT SAMPLE SOURCE FILE TO VIEW dropdown. There you can find the controller code as well in the OrderEntryFormController.cs file.
Using the editors helpers with MVC model binding is pretty easy. Just use the corresponding <Helper>For method. They are used the same way as you would use the build-in helpers, the only difference is that you need to call the Render() method in the end.
For example if you have a model with property Date of type DateTime using <%= Html.Infragistics().DatePickerFor(m => m.Date).Render() %> will populate the date picker with the date from this property. When the HTML Form is posted back to the server if your action accepts a parameter with the same type as your model you will be able to find the modified value in the same Date property.
Hope this helps,