Skip to main content

Posts

Showing posts from January, 2015

SPGridView control Example

We normally use asp.net gridview control as substitute to SharePoint gridview Control. Compare to asp.net gridview control SharePoint gridview provides rich functionality. Below two are the reasons that I feel to use SPGridView control instead of asp.net gridview control. 1.        SPGridView is inherit from GridView, so it will have features of GridView and also some special features that suite for SharePoint environment, so for a SharePoint web part, I suggest to use SPGridView. 2.        Also SPGridview control supports built-in SharePoint cascading style sheets, menus, sorting in SharePoint manner. In this blog I will try to show, 1.        Create SPGridView. 2.        Bind data source to SPGridView. 3.        Apply paging to SPGridView. 4.        Allow Filtering. Let’s create demo SPGridView. I have created a list on my SharePoint site with following columns. Column Name Type ID int Title Single line of text