KendoUI foreign key dropdown not showing

I have used the grid in many projects and I typically don’t have a problem with this, but on a recent project I couldn’t get the dropdownlist in the foreign key fields to show. There were several things I had forgotten to handle so let me document it to save a few hours in the future.

First, make sure that EditorTemplates exist in your project. There is a ForeignKey.acsx and .cshtml, so get those and might as well grab them all. These can be found in the example project from your initial KendoUI sample download.

editorTemplates

 

Next I had to make some additions to the main web.config and to the Views web.configs (make sure to alter the Views web.configs in the site root and in the Areas if you are using areas).

In the site web.config add this section:

mainwebconfig

 

In the Views/web.config (in the site root and in Areas) make sure the following is added within the system.web (not system.webServer) section:

ViewsWebConfig

At this point the dropdowns began working for my grids.

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s