Tuesday, August 18, 2009

New contribution to the community on Codeplex - The Sharepoint SPMultifilter web part

The Sharepoint SPMultifilter web part



The Sharepoint SPMultifilter Web Part is a web part that shows items from a Sharepoint List and such items can be filtered and ordered from a View of the list.
Items are shown on a grid with 5 Columns. Those columns can be filtered on the Sharepoint page without rendering again the whole page, just like an Ajax behavior.
So you can write the letter or word with wildcards and search the item you want on the grid.


Here you can see the steps so as to install the SPMultifilter web part;

• Firstly you must download the SPMultifilter.zip file to a local folder on your Sharepoint Server
• Expand it.
• Goto the deploy\SPMultiFilter Folder
• Run the deploywithwspbuilder.bat file
• Add the spMultifilter Web Part to your Web Part Gallery
• Edit your page and add the spMultifilter Web Part.

Web Part Attributes

The Sharepoint SPMultifilter Web Part has some attributes so as to render the needed Columns on the grid.
The attributes are:
• List
• View
• Field1
• Field2
• Field3
• Filed4
• Field5
• RowAColor
• RowBColor
The “List” Attribute is used to set the Sharepoint List to be shown on the grid. The items of this list will be filtered and ordered using the “View” attribute. So you can create a new View so be used by this web part and where you can choose your order and filter as you want.
The “Fieldx” attributes are the columns to be shown on the grid and will be the attributes to be filtered on the textboxes placed on the head of the grid, so that you can type letters and filter on-the-fly.
It is very important that Fields chosen on the attribute, exists on the View you have set on the “View” attribute. Otherwise the column won’t be shon on the grid.
The RowAColor and RowBColor attributes are the colors to be shown on the grid rows.



In the next image, you can see 6 items, and if you write the ‘m’ letter on the Title textbox , you ‘ll see only 2 items. The ‘Microsoft and Yahoo’ title and the ‘Michael Phelps’ Title.

Filtering with wildcards

While you are writing letters to filter the grid you can use 2 wildcards, * and !, * makes ignore part of the word to filter. For example if you write *p , you will see 2 items filtered on the grid; you ‘ll see the ´Michael Phelps´ Title and ´Google’s Big Plan for Books´, because those titles contains the ´p´ letter and some another letters before ´p´.

Another wildcard you can use is ! . With this wildcard you will search all items except the ones you are writing. For example if you write !m, you will see 4 items, You ´ll see all items except the ones that starts with ´m´.

Special Columns
Also there are 2 special columns that doesn’t use the filtering functionalities. They are just to have a more user friendly grid.
URL Columns
You can choose a URL type column so that will be rendered on the grid as a Link to the content you have on the item.
This link can be opened on the same browser window or in a new broser window or in a frame. You just need to have a column named target on your “View” and set its value as “_window” or “_blank”.

Edit Columns
Another special column on the grid is the “Edit” Column. This type of column can be used so that you can edit an item from the grid as usual Sharepoint Webparts. Just set one of the “Fieldx” attributes with the word “Edit” and you will see an icon so as to edit the item.If you use this option, you must add the ID field in your View.

This web part can solve you access to links easily filtering by any column.
Note that it will render items depending of a view, so it is recommended to show all items of a list on the view without paging it, but taking care of performance of the page that will contain the web part.
If you need new functionalities you think are useful on this web part please contact to Fernando Hunth ( fhunth@hotmail.com ) or post it on the Codeplex project http://spmultifilter.codeplex.com/

Labels: , , , ,


Post a Comment

<< Home