Incorporating CRUD Facility in WSS 3.0 List
In my previous piece, with the aid of Microsoft Office SharePoint Designer 2007, we have tried to customize the New Item page of a Discussion Board. Now in this paper, we will try to customize the All Item page of a Custom List by incorporating add, edit, and delete buttons on the list. This may provide us a response to some customization requirements of our portal.
At the end of this paper, we are expected to have the crop below:
1. We will start by creating a Custom List with the following columns: Personnel Code, Last Name, First Name, Middle Name, and Birth Date. We will name it Personnel Information. And for our purpose, let us add an item/entry to our list.
2. Let us open our Personnel Information in Microsoft Office SharePoint Designer 2007.
3. To start the customization, let us add an aspx page through File > New > ASPX. For our purpose, we may name it as CustomAllItems. Below is the illustration.
4. In the design panel, let us add a single-row/single-column table on the page.
5. In the Data Source Library pane, click Personnel Information, then Show Data. The Data Source Details pane will be displayed.
6. At the bottom of the Data Source Details pane, uncheck the Show Data Values checkbox. Below is the expected status of the Data Source Details pane.
7. From the Data Source Details pane, select Personnel Code, Last Name, First Name, Middle Name, and Birth Date, and drag them into the table we have created. We can directly edit the header text of our data view by pointing directly to a corresponding column header.
8. To arrange the columns, click the Property Arrow at the upper-right side of the data view, the Common Data View Task dialog box will be displayed. Below is the illustration:
9. In the Common Data View Task dialog box, click Edit Columns link. As illustrated below, the Edit Column dialog box will be displayed to arrange the columns of our data view.
10. To format our Date Birth column, click the Property Arrow of the column, and then DateTime formatting options, then uncheck the Show Time checkbox, and then click OK. Below is the illustration:
11. Moreover, to add a formulated column, right-click a specific column, the click Insert Formula. Below is the illustration:
12. Now it time for us to incorporate the CRUD facility in our data view. Click the Property Arrow at the upper-right of our data view, then click Data View Properties. The Data View Properties dialog will be displayed.
13. As illustrated below, select the Editing tab of the Data View Properties dialog, then check the Show Edit Item Links, Show Delete Item Links, and Show Insert Item Link checkboxes.
14. Finally, we are going to attach a master page to our CustomAllItems page. As illustrated below, click Format > Master Page > Attach Master Page. The Select a Master Page dialog box will be prompted. Let us select the Default Master Page option, and then click OK. In the Match Content Region dialog box, let us click OK.
15. As brief as that, without writing a single line of code, we have already created a WSS 3.0 Custom List with CRUD facility.
Hoping to share you something, I am.