locked
How to pull data in a document library? RRS feed

  • Question

  •  

    Hi all,

     

    I'm new with programming in sharepoint.

    Can you give me idea or code snippet of how to pull data in a document library then placed it in a gridview or listview?

    for example , a data like ahm.. date modified or the item itself(it's link).

     

    Thanks,

    Wednesday, March 12, 2008 3:42 AM

Answers

  • Mate, it doesnt matter vs 2005 or 2003 or 2008 - it is .NET!

     

    but for the record, I wrote these using VS2005. if you dont understand the samples...maybe you are not ready?

    Wednesday, March 12, 2008 9:56 AM

All replies

  • If you mean in a webpart, look in my blog - this article: http://www.sharepoint-tips.com/2007/03/server-side-controls-and-data-binding.html

    Look for the header "Controls are rendered, but data isn't rendered". under it I show an example of a web part that does a query on a  list (a document library is also a list) and shows the items in a grid.

     

    If you meant client access, and not running the code on the sharepoint server, you will need to use the GetListItems function of the lists webservice. again, you can see my blog on how to use that function.

     

    Wednesday, March 12, 2008 4:09 AM
  •  

    Hi,

     

    I've tried to copy the code under the header "Controls are rendered, but data isn't rendered". Bbut i'm having a problem coz i'm using vs2005,, can i have this in vs2005 ?i think its in vs2003 made?

     

    thanks

    Wednesday, March 12, 2008 9:06 AM
  • Mate, it doesnt matter vs 2005 or 2003 or 2008 - it is .NET!

     

    but for the record, I wrote these using VS2005. if you dont understand the samples...maybe you are not ready?

    Wednesday, March 12, 2008 9:56 AM
  •  

    I understand a little.

    Is just the same if this willl pull from a document library?coz in the sample its in a list its pull, am i right?

    Wednesday, March 12, 2008 10:15 AM