Using a ListViewWebPart for Search Results
December 5th, 2008
4 comments
I have had to try and create a Search page that displays its result set in the style of a ListViewWebPart. This has proven quite tricky.
After a lot of Searching I found various articles on using SPQuery and then the List.RenderAsHtml(Query) to achieve this. However I found a rather large problem with this method, whilst it queries what I want it to the resulting HTML looks nice but does not do any kind of paging also whilst the sort and filter drop downs appear at the top of the columns, they don’t actually do any sorting or filtering.
Now that was completely unacceptable.
Categories: development, Sharepoint filter, paging, renderashtml, Sharepoint, sorting, SPList.RenderAsHtml, SPView.RenderAsHtml, wss