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?

1 Answer 1


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

  • Sure, but how can I populate it client-side (jQuery)? This seems only possible to populate in the .NET side.
    – empz
    Nov 6, 2012 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 Nov 7, 2012 at 9:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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