SPGridView with SPDataSource in SharePoint 2010 Wiki pages
Vladi Gubler
Vladi Gubler
February 24, 2011 | Development

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?Wink)

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.Embarassed

So, if for some reason, you run into this issue, now you have a clue what is going on.

Loading...

Add your comment

Comments are not designed to replace support calls. If you have a specific issue with one of our products, please send an email to support@infowisesolutions.com to open a support ticket.

UltimateForms

Build powerful business applications in SharePoint using only your browser.
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.

support@infowisesolutions.com

Related Topics

What is right for you?

Online Trial

Not ready to install yet? Create a trial site in our environment
  • Full control of the site and its settings
  • Optionally pre-install one of our solution templates
  • Site provisioned instantly
  • Automatically removed after 30 days
  • Available to everyone!

Error!

There was an error processing your request.
Please contact us for further details.

Installation

Install in your own environment, on Microsoft 365 and on premises
  • Start working with real users and data
  • Install online or on premises
  • Register for 30 day trial
  • Seemlessly convert to paid license
  • Requires administrator permissions

Success!

Download link has been emailed to .
If you do not receive it within 5 minutes, please check your spam.
The link is valid for 72 hours.
If you are having problems, please contact us.

Error!

There was an error processing your request.
Please contact us for further details.
Technical details:

Request a Live Demo

Book an appointment for a one-on-one with an ULTIMATEforms expert trainer.

Test drive the awesome power of ULTIMATEforms

Learn how to quickly and easily turn time-consuming business processes into automated, efficient workflows.

Have a strong start

Only thirty minutes of well-coached time can translate into great future savings in time and money. So, sit back and enjoy the ride.

It's Free

Learn how to address business process pain points immediately. Save time and money.