Sharepoint 2010 - Web part development

We have used choice filter webpart that comes out of box in sharepoint in order to send selected month information to the report (By creating connection between two web parts). But user experience of this (choice filter web part) is not very attractive. So I have decided to create a custom Visual Web Part. VS2010 has template to create visual web part.



We author the user control (that the VS template created for us) as a normal asp.net user control.

Then we go to the class that derives from the WebPart (the VS template created this class for us too) and start to make necessary changes. We want to connect this web part with the report web part, and moreover we want this web part to be provider. For that we need to add a method and mark it as ConnectionProvider. Since we want to provide start date and end date to the report viewer, we added two methods to this class, each of which is marked as ConnectionProvider.


After deploying this web part, we add this web part and a report to a page. Then configure the connections.



No comments:

Post a Comment