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

input fields on popup dialog are not using Kendo UI extensions

3 Answers 211 Views
Grid
This is a migrated thread and some comments may be shown as answers.
cxu
Top achievements
Rank 1
cxu asked on 25 Jul 2012, 07:46 PM
When I run the Kendo examples, I see the input fields on popup dialogs for Edit and Create are using Kendo UI extensions. For example, kendoDatePicker is used for DateTime field, kendoNumericTextBox is used for numeric field, etc. However, on the popup dialogs of my application, this is not happening. The plain html input tags are used. Can anyone tell me what I am missing?

3 Answers, 1 is accepted

Sort by
0
Victor
Top achievements
Rank 1
answered on 31 Jul 2012, 09:50 PM
I would guess you havent added the editor templates to get the desired functionality. These can be found in the release zip file in wrappers\aspnetmvc\EditorTemplates and should be placed inside "your web project"/View/Shared/EditorTemplates

If you name them as they are (DateTime for example) they will be used by default. If you name them something custom (kDateTime for example) they will not be selected by default, but you can use them by setting the attribute [UIHint("kDateTime")] on your view model property.

Cheers
/Victor
0
cxu
Top achievements
Rank 1
answered on 02 Aug 2012, 09:38 PM
Thanks for the exact answer. Wish it was documented somewhere. For people with the same question, please note that in Victor's answer, the naming means the name of the files in the EditTemplates folder. Also note there are two files with the same name but different extensions. One will need to use the same name for both.
0
Victor
Top achievements
Rank 1
answered on 02 Aug 2012, 09:48 PM
Glad it was helpful!

For more in depth information about editor templates and display templates I can recommend Brad Wilson's now slightly dated but still very good blog series: http://bradwilson.typepad.com/blog/2009/10/aspnet-mvc-2-templates-part-1-introduction.html

It is written about ASP MVC 2, but the concept stays the same for 3 and 4 as well. To find out how default templates are written, the ASP MVC sources are of great help (https://aspnet.codeplex.com/releases/view/58781) and also MVC futures from the same page.

/Victor
Tags
Grid
Asked by
cxu
Top achievements
Rank 1
Answers by
Victor
Top achievements
Rank 1
cxu
Top achievements
Rank 1
Share this question
or