How to use SPGridview
In this post I’d like to show you how to use SPGridview. In SharePoint2010, if you like to display data in a view like SharePoint, you can use a SharePoint Server control called SPGridview. However, there are a few tips and tricks you need to know to work around some of the known issues of SPGridview.
1. Fixing the group title row disappearance and the sort indicator arrow image, you can find the solution in this blog post.
2. If you turned on grouping, you might get the following error when you do a postback “System.ArgumentNullException: Value canot be null“. The problem happened while rendering the rows again after the postback.
To solve this problem you can find the solution in this blog post and remember to turn off view state after applying this fix.
You can download a complete solution with all of this fixes here.