SharePoint 2010: Cascading Dropdown For Lookup With More Than 20 Items

Posted: November 7, 2014 in SharePoint2010

Introduction

When your list reaches 20 items or more, SharePoint decided to automatically replace this simple, clean and elegant dropdown with a messy, sloppy and difficult-to-use Complex Dropdown. This is meant to be an upgrade. The text box, with jQuery behind it, allows users to type the item that they’re looking for (that you can actually already do with a dropdown). However, in practice, it is prone to unexpected behavior.

Cause

I have a requirement to cascade a country and state dropdown in a SharePoint list. I have tried it using SPCascadeDropdowns and it’s not working with more than 20 items in the child dropdowns. This shows my child dropdowns:

cascadedropdown

Solution

SimpleChild

If set to true, the child dropdown will be converted to a “simple” dropdown only if it is a “complex” dropdown on page load. Edit the page in the browser and add a Content Editor Web part, modify the web part and show the Source Editor to add the following code:

samplechild

edit in cascadedropdown

Summary

We made the cascading lookup to display more than 20 items successfully. The lookup column now works fine for more than 20 entries also.

Advertisements

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