In this blog I will set up a web page that will allow users to click on an icon next to a course number and see the actual course outline in a web part below.
In order to do this I will use the following steps:
- Create a Custom List and add some data to the list.
- Create a Custom View called CourseOutline and edit the Tabular View to remove the Allow individual item checkboxes setting on this view.
- Create a new page and insert 2 web parts pointing at the courseOutlines List.
- Edit the titles of the web parts to Course and Outline.
- Attach the custom CourseOutline View to the bottom web part.
- Open the site in SharePoint Designer 2010 and edit the Page.
- Add a web part connection.
- Test the page.
Custom List
I have prepared an out-of-the-box team site at the top level site of a new site collection for this demonstration. I have already created a list called courseOutlines and populated it with data. The image above shows the Columns and their respective data types (I changed the title column to CourseName)
(image of columns)
Custom View
Create a Custom View called CourseOutline. I do this by choosing the List tab and clicking on the Custom View Icon.
Standard View
I select Standard View.
Outline
I name the View Outline, leave the default since it is a Public View, and select only 2 columns:CourseNumber and CourseOutline. I then scroll down so that I can edit the Tabular view section.
Tabular View
I click the + icon next to Tabular View.
Change Setting
I uncheck the box next to Allow individual item checkboxes. I don't need users to be able to select individual items in this view. I scroll down and click OK (not shown)
Verify View
I check the view and since this is what I want I move on to creating the page.
Create Page
I click Site Actions>New Page
Name Page
I name the page CourseDetails and click Create.
Insert First Web Part
I select the Insert tab and click on Existing List in order to insert the web part that will show the courses.
Course Outlines
I select courseOutlines from the Web Parts Gallery and click on Add.
Repeat
I repeat the insert web part process to place a duplicate web part below the first one.
Edit Bottom Web Part
I click on the black triangle (ufo reference LOL) and select Edit Web Part from the menu that appears.
Select View
I Select Outline from the Selected View drop down menu and then I click the + sign next to Appearance so I can change the title of the Web Part.
Change Web Part Title
I change the Title of the bottom web part to Outline, then I click OK (not shown).
Edit Title of Top Web Part
I select the black triangle glif on the top web part and choose edit web part.
Change Title
I expand Appearance and change the title to Course and click OK (not shown)
Save Page
I click the Save Icon.
Edit inSharePoint Designer
I choose Site Actions > Edit in SharePoint Designer to open the site in SharePoint Designer 2010 where I will add the web part connection.
Site Pages
I select Site Pages in the Navigation Pane, and click on the CourseDetails.aspx link which opens the summary page.
Edit File
I click on the Edit file link in the Customization section of the Summary page.
Add Connection
I make sure to select the WebPartPages:XsltListViewWebPart and then click Add Connection from the ribbon.
Set Up Connection
I leave the defaults here which is for the Course Web part to Send Row of Data To and click Next.
Get Filter Values From
In this case the Web Part Connection Wizard is pretty intuitive and has correctly summized that I want to connect to the Outline web part so I click Next.
Map the Fields
I click in the Columns in Course table and select CourseName in the Inputs to Outline CourseName row to map those columns.
Check Settings
I check the settings and click Next.
Finish
I click Finish.
Save the Changes
I make sure to click the Save Icon in SharePoint Designer 2010 then I close the program. I click yes to the prompt.
Refresh the Page and try it out
I go ahead and refresh the page then I will see the small glyphs to the left of the CourseNumber with a new Select column.
Depending on your list, web part, and columns you choose during the Web Part Connection Wizard you might be presented with the option to present the 'Filter' column as a hyperlink but in this example that was not the case. If you click on the Gyph the course outline will change accordingly. I clicked on the Glyph next to SPD2010 and noticed the Outline web part changed accordingly.
No comments:
Post a Comment