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 am building a custom visual webpart where I want to show all the calendar events across a site using SPSiteDataQuery. I know I can use asp.net repeater or grid view to show the data but I was wondering if there is a SharePoint data control I can leverage to have all the functionalities a list view webpart has (ecb/context menu, sorting, paging, etc). Any help will be appreciated.

Thanks!

share|improve this question
1  
SPGridView, its just like List View... –  Arsalan Adam Khatri Nov 20 '12 at 19:29
    
Arsalan, please add your comment as an answer and I will mark it as the accepted one. –  Emon Nov 21 '12 at 17:05
    
there you go :) –  Arsalan Adam Khatri Nov 21 '12 at 17:43
add comment

3 Answers 3

up vote 0 down vote accepted

SPGridView, its just like List View...

share|improve this answer
    
code.msdn.microsoft.com/office/… is a good resource for SPGridView –  Emon Nov 21 '12 at 17:55
add comment

You can instantiate a ListViewWebPart in a visual web part.

Here's an example posted on this site:

How to extend a ListView WebPart (from code)

And here's a blog post with examples on how to perform the second option:

Create Custom ListViewWebPart

share|improve this answer
    
+1, sadly, ListViewWebPart is sealed. However both links are great and I can recommend them. –  ppatalong Nov 20 '12 at 20:15
    
Reflection my friend. –  RJ Cuthbertson Nov 20 '12 at 20:30
add comment

Interestingly, I see there's a ListViewByQuery Web Part here. I'll be trying it out to see if it does what I need.

share|improve this answer
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.