Hello,
Just a quick post about an annoying issue we had to tackle recently.
We needed to build a simple web part to show some data from a list with filtering and paging. As this was a SharePoint 2010 project only, we chose to use the new Visual Web Part (which is basically a user control loaded inside a web part, we used to do that in 2007 as well, just did not call it a visual web part, but who cares?)
Visual web parts allow you to move much of the logic into the markup of the ASCX file, which means you can use drag and drop techniques for placing controls and other cool features we are all familiar with from the world of web site design.
In this case all we needed were a SPDataSource control, which provides us with the data from a SharePoint list, and SPGridView, which renders the data on a page, complete with SharePoint native CSS classes and general look and feel. All in all, a quick 5 minute job, no thrills. The problems started when we tried to enable filtering: it just would not work, the context menu would be stuck in "Loading" and nothing. After hitting the head against the wall, trying all kinds of workarounds, converting the whole thing into a regular web part, replacing the SPDataSource with ObjectDataSource, there was no progress! The whole thing took more than a day and still nothing.
Finally, a bright idea - put the web part on another page, the first time it was a rich text control on a Wiki page, but now a regular web part page with regular web part zones. And, voila! Everything working straight away, no coding required! The wiki page (or the rich text control specifically) probably has some included JS that interferes with the SPGridView and breaks the whole filtering AJAX infrastructure. It's a shame that Microsoft did not find out about it in their QA tests, but it happens to the best of us.
So, if for some reason, you run into this issue, now you have a clue what is going on.
Add your comment
UltimateForms
100% No-Code Solution
It's never been easier, to create, innovate and share, all you need is your web browser!
Cost-effective
Address business process pain points immediately. Save time and money.
Fantastic Support Team
Facing difficulties installing the application? Contact our fantastic support team.