C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Cascading Lookup using JQuery in SharePoint 2010
WhatsApp
Laxman Vyavahare
10y
6.7
k
0
0
25
Blog
Procedure
Step 1
Create list namely State , in default column Title add list of States.eg. MH,MP,UP etc.
Step 2
Create 2nd list namely City, create lookup column State on State list, add city names in Title column relevant to states.
Step 3
Create 3rd list where you want to use this relation, here my list name is RRF , in RRF list 1st default column is their and create two more column first is state lookup on State list, 2nd is city column lookup on City list.
See all items of State and City list get binds to 3rd list RRF, now we need to establish cascading relation.
Step 4
Open 3rd RRF lists newform.aspx page in sharepoint designer and add fallowing lines of code below script tag.
<script type=
"text/javascript"
src=
"../../Style Library/Js/jquery-2.1.1.min/jquery-2.1.1.min.js"
></script>
<script type=
"text/javascript"
src=
"../../Style Library/Js/jquery.SPServices-2014.01/jquery.SPServices-2014.02ALPHA7.js"
></script>
<script type=
"text/javascript"
>
$(document).ready(
function
() {
$().SPServices.SPCascadeDropdowns({
relationshipList:
"City"
,
relationshipListParentColumn:
"State"
,
relationshipListChildColumn:
"Title"
,
parentColumn:
"state"
,
childColumn:
"city"
,
debug:
true
});
});
</script>
Refresh page and see result....
NOTE:
Use latest JQuery version ie. JQuery.SPServices-2014.02ALPHA7.js because in previous versions can not support for required fields.
Recommended related topics
Membership not found