Cascading Dropdown for Lookup with more than 20 items

Posted: September 26, 2014 in SharePoint2010

Introduction

When your list reaches 20 items or more, SharePoint decided to automatically replace this simple, clean, and elegant dropdown with some 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 (which you can actually already do with a dropdown). However, in practice, it is prone to unexpected behavior:

Cause:

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

Picture9

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.:

Picture10

Picture11

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