Solved

Sharepoint List Querry

Posted on 2013-01-20
3
238 Views
Last Modified: 2013-01-25
I need to show the qurry result of a list in sharepoint in datagrid view that I have in a web part. How can I do this? How can I run a querrry based on the list data and bind it in gridview? Is there a sample code that someone might have??
0
Comment
Question by:pauledwardian
3 Comments
 
LVL 1

Expert Comment

by:bounty457
ID: 38798195
0
 
LVL 14

Accepted Solution

by:
KoenVosters earned 500 total points
ID: 38800363
You can use CAML Designer to build the query:

http://sharepoint.biwug.be/SitePages/Caml_Designer.aspx

You can use SPQuery Class to run the query (see example)

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spquery.aspx

You can get the DataTable propertie on the returned listitems to bind to your grid.
0
 

Author Closing Comment

by:pauledwardian
ID: 38820352
thanks!
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
HttpPostedFile 1 30
Latest thoughts on C# utilizing Mono on Linux vs .NET on Windows? 5 66
VB.NET 2008 Winforms Signing 13 33
pressing download button in c# 7 24
Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 do not offer the option to configure the location of the SharePoint diagnostic trace log files during installation.  This can, however, be configured through Central Administr…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question