Die deutschsprachige Community für SharePoint, Microsoft 365, Teams, Yammer und mit Azure
SharePoint - Guide to using a SPGridView


Oliver Wirkus



Web 2.0



 Add to Technorati Favorites


 Delicious Bookmark this on Delicious


  Locations of visitors to this page


The SPGridView control id often used to display data, but handling with its various properties can be confusing. As long as it is only used to simply display some data, setting up this control is far beyond any rocket science. But when filtering and sorting on various columns should be used, the handling of the properties, the event handlers and the view states can be very tricky. That’s the reason why there are guidance posts in so many blogs.

I found a very handy guide to setup a SPGridView control with sorting and filtering in the Reverse Alchemy blog. Erik Burger wrote two posts about how to setup a SPGridView with filtering and sorting.

This is the link to the first post:

This is the link to the second pots:

Thanks to Erik for his awesome tutorial :-)

Remark: You don’t need to use an additional pager object like Erik has done in his code. You can use the standard pager of the SPGridView too. If you use the standard pager and filtering has been enabled you need to add an additional event receiver to the SPGridView like this:



This event receiver renews the filter expression setting of the datasource (ObjectDataSource) when the pager is clicked.


Add to Technorati Favorites Folge mir auf Twitter FourSquareLogo

Bereitgestellt 27 Feb 2013 11:51 von Oliver Wirkus
Gespeichert unter: ,