SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this Visual Web Part that make a request to a WCF service and returns a list of Sharepoint documents. Currently I'm showing them in a <ul>, creating the HTML in the succeded ajax event in jquery.

I want to know if there's a way to show the documents in tables, like Sharepoint does, with the columns. So when someone edits the design and colors of the site, the webpart will follow along.

If Sharepoint does not provide something like this, maybe creating the table in javascript with the correct CSS classes will produce the same results.

What do you think?

share|improve this question
up vote 0 down vote accepted

The SPGridView is a SharePoint version of the ASP.NET GridView where you get the right classes for free.

share|improve this answer
Sure, but how can I populate it client-side (jQuery)? This seems only possible to populate in the .NET side. – emzero Nov 6 '12 at 19:18
You can't populate that client side, but you may populate a dummy row on the server and the use that as a template for adding additinal rows client side. The advantage over doing all of the generation client side is that you html will follow changes made in SharePoint – Per Jakobsen Nov 7 '12 at 9:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.