Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.