I know this is a basic question! But still, I need to know
- What is Grid View?
- How to use it?
- What is it used for?
Any documentation or links will be of a great use! Thanks!
-saumil Using SP2010
I know this is a basic question! But still, I need to know
Any documentation or links will be of a great use! Thanks!
-saumil Using SP2010
Here are some links about how to implement paging and filtering in SPGridView
GridViews, as linked to by Ziga, are a standard .NET control. If you're asking about that, then you'd probably be better off asking at Stackoverflow; this is the forum about SharePoint technologies.
However, SharePoint does have it's own SPGridView. It's much like the standard .NET one, but doesn't have some of the features of the .NET one (such as auto generated columns)
Both controls take data from an ADO Datasource (such as a DataTable) and display it as tabular data. The SharePoint one also formats and styles it to look 'SharePointy'. They also allow paging, sorting, grouping, etc.. In fact, they're very powerful controls.
Regarding using them - well, lots of examples are already online, but I'll highlight the MSDN one about SPGridView. Most examples that apply to GridViews also apply to SPGridViews. You do have to make a choice between declarative and programmatic syntax - that is, you could define your SPGridView just through ASP tags:
<SharePointWebControls:SPGridView runat="server" ID="MyGridView" DataSourceID="dataSourceLinks" AutoGenerateColumns="false" EmptyDataText="<p><i>Not got any links.</i></p>">
<Columns>
<asp:BoundField HeaderText="Title" DataField="Title" />
<asp:BoundField HeaderText="Link" DataField="Link" />
</Columns>
</SharePointWebControls:SPGridView>
Or via C# code, or a combination thereof.
I don't know if this is what you are looking for, but it's a start - http://msdn.microsoft.com/en-us/library/ms752213.aspx