0

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!

2
  • 1
    SPGridView, its just like List View... Commented Nov 20, 2012 at 19:29
  • there you go :) Commented Nov 21, 2012 at 17:43

3 Answers 3

0

SPGridView, its just like List View...

1
2

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

2
  • +1, sadly, ListViewWebPart is sealed. However both links are great and I can recommend them. Commented Nov 20, 2012 at 20:15
  • Reflection my friend. Commented Nov 20, 2012 at 20:30
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.