Here's what I have in my Sharepoint 2010. A page showing a list view webpart and the related lists in separate webparts. Based on the value selected in the parent list, the child lists are populated. What I want to do now is display the selected value (the parameter that is passed to the related webparts) in a separate webpart and preferably in a format like "You have selected: ". This should keep changing with the selections.

I tried making a connection between a new list webpart and the parent list webpart and showing only the desired column - but this comes with the column name and I don't want a display like that. I also tried a CEWP but could not establish connection to it.

Any help is much appreciated.

1 Answer 1


In Sharepoint Designer 2010

Create and fill 2 lists:

  • ParentList
  • ChildListWithoutLookup
    • Id
    • Title
    • ParentId (Number of decimal places: None)

Create a web part page:
"Site Pages" --> "Web Part Page" --> give it a name

Enter editing of page
On Ribbon choose "Insert" --> "Data View" --> ParentList

"Insert" --> "Display Item Form" --> ChildListWithoutLookup

Make data connection:

enter image description here

enter image description here

On Design surface

  • choose ParentList webpart --> Options (List View Tools) --> make sure "Inline editing" activated

  • choose ChildListWithoutLookup web part

    • on ribbon click "Options" (List View Tools) --> "Add/Remove columns" --> make sure that only ParentID is chosen
    • Change text "ChildListWithoutLookup --> "You have chosen: "

Press F12
On clicking "Select". the corresponding parent Id is shown

Upon clicking "Select" on 1st line:
enter image description here

Upon clicking "Select" on 2nd line:
enter image description here

I believe that it is advisable to avoid messing with the Sharepoint code without extreme necessity.
If you still want to get ID in code, it is possible to extract from URL (property) using substring() after "SelectedID=" (before following "&" containing the ID of parent item on which a user pressed the button in "Select" field.

  • I'm not sure I completely understand. Let me try to clarify my question. The separate webpart that I'm talking about does not have any lookup to the original webpart - it only has a data connection created manually. Related view and lookups are only between the parent and child lists - I mentioned them to explain the scenario. Does this make the position clearer? Pls let me know if you need more clarification and thanks for your reply. Jun 6, 2012 at 14:42
  • I changed my answer Jun 6, 2012 at 18:10
  • You are awesome. Thanks for taking the time. I currently don't have the Designer enabled in my office environ but will be receiving it soon. But this looks entirely workable - will try it out soon! Jun 6, 2012 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.