SPGridView-Does SharePoint use this?
- Folks,
I 've came across to the control SPGridView. It's indeed a nice control that allows me to have the "SharePoint look & feel" for my custom data. But I really wanted to know onething, does SharePoint also uses this control to display the native SharePoint list items? Or they use something different?
The reason I am asking this question is, SharePoint list can have too many items and still the native list web parts can display grouping over that data. But If I use the SPGridView with an ObjectDataSource or SqlDataSource then I really can't use the grouping because it's not possible for me to load entire dataset into the memory to do "data binding' in SPGridView control, and without the Databinding the grouping will not work.
Now obviously I wanted to know the magic behind the SP implementation. How do they allow grouping for a large dataset? I don't think MS guys are loading the entire row sets of that list from the database. So how they allow grouping?
Is there any magic lies into the SPDataSource implemention? If anyone knows something about this issue, I would be too happy to hear from you. Please share your knowledge. Thanks in Advance!
- Moim Hossain [Please mark as answer if this post helps you]
Answers
Hi,
ListViewWebPart render SPView with SPView’s CAML Schema directly and it does not use SPGridView inside.
Can you use paging to avoid large dataset loading? You can use CAML to query limited items for each page, similar to SQL-Store procedure paging solution.
Please see:
http://www.keyongtech.com/5080834-caml-query-paging
More reference: Some Grid Controls in SharePoint
SPGridView
ListView WebPart(you can render view schema dynamically)
http://avinashkt.blogspot.com/2008/12/sharepoints-listviewwebpart.html
ListViewByQuery
http://karinebosch.wordpress.com/sharepoint-controls/the-listviewbyquery-control/
Hope this can help.
Best Regards,
-Aaron
- Marked As Answer byAaron Han - MSFTModeratorFriday, November 13, 2009 10:17 AM
All Replies
- Sharepoint uses ListViewWebPart to show native sharepoint list items.
- Vijander, thanks for your kind reply.
Actually I knew that SP uses this ListViewWebPart web part to render the list items of native list. But I was actually interested to know what control the ListViewWebPart uses to render the GRID..!
Because you know, the web part is a control that hosts someother ASP.net controls in it to render the actual data...i.e. the ListViewWebPart uses a toolbar, a grid control and stuffs like that. I wanted to know what grid control it uses...SPGridView or something else?
Thanks for your reply though :)
- Moim Hossain [Please mark as answer if this post helps you] Hi,
ListViewWebPart render SPView with SPView’s CAML Schema directly and it does not use SPGridView inside.
Can you use paging to avoid large dataset loading? You can use CAML to query limited items for each page, similar to SQL-Store procedure paging solution.
Please see:
http://www.keyongtech.com/5080834-caml-query-paging
More reference: Some Grid Controls in SharePoint
SPGridView
ListView WebPart(you can render view schema dynamically)
http://avinashkt.blogspot.com/2008/12/sharepoints-listviewwebpart.html
ListViewByQuery
http://karinebosch.wordpress.com/sharepoint-controls/the-listviewbyquery-control/
Hope this can help.
Best Regards,
-Aaron
- Marked As Answer byAaron Han - MSFTModeratorFriday, November 13, 2009 10:17 AM
- Thanks Aaron. I've got my answer :)
- Moim Hossain [Please mark as answer if this post helps you]

