0

I have an interesting question that make me thinking and searching too much.

I have a sharepoint list, I want to print items I checked to PDF, each item on a page and the template for item depend on the columns in the default display form of that list (remember that sharepoint list has multiple display form with different number of columns and I just need the columns of default form).

The problem is how to get the columns of default display form when I still in the sharepoint list? (I haven't navigate to the display form yet).

I use SharePoint 2013.

Anyone know this case please share me.

0

Every SPList object has a 'DefaultView' Property, the Default View Property has a 'ViewFields' Property.

Here's a link to the documentation on that Property as well as a code snippet:
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spview.viewfields(v=office.15).aspx

If you want to access it via REST, it would be:

http://sp/_api/web/lists/getbytitle('ListName')/DefaultView/ViewFields

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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