Sunday, February 8, 2009

Displays one announcement at a time using DataView webpart

I had a requirement in my project where I had to customize the display of announcements. I was supposed to display single announcement at a time, providing the provision for the user, to navigate through the list of announcements one by one. User should be able to view next, previous and all the announcements. This needs to be done without writing any code.

Here is my approach for this problem. I have created a view for the announcements list which contains required columns along with the Id column. ID column is mandatory for this approach. Using SharePoint designer, in the announcements list I have created a custom form. Use this custom form to display one announcement at a time. Place a data view webpart on this form and customize it to accept query string for ID column to display that announcement.

Place Bank To all View Previous View Next links on the top and bottom of the webpart in this way.



Use the following JavaScript to access and display one announcement at a time.








No comments:

Post a Comment