Actually gridview control is built with lot of features and this control is commonly used for all applications.
Fortunately Grid View can also be used without attaching with the Data Source Controls. In this article we will see how paging, sorting and editing can be implemented in a Grid View control that is bound with a Data View (or Data Table) directly.
This calls for some extra coding from developer's end. As an example we are going to use Employees table of the Northwind database. Add three Bound Fields and a Command Field to the Grid View with the help of Fields dialog (see below).
A yogic approach to success, happiness, and inner transformation. There are many articles and tutorials around that illustrate the use of Grid View control along with the new Data Source Controls.
A powerful sequence of Mantra, Pranayama, Hand Mudras and Meditation. When attached with a Data Source control Grid View performs tasks such as paging, sorting and editing automatically i.e. However, at times you require to bind the Grid View with a Data View or Data Table directly.
So sorting, paging, columns names facility are created without much more coding. Here you can see how easily Grid View present the tabular data. So, if you click them it can show next page or sort by specific column.
Its been a long time I have written any article on ASP. Just few weeks back I got a very interesting requirement where I had to customize my Grid View by Grouping the Columns and also merging the Rows by using Colspan properties. In this simple example we create a default formatted Grid View. Even we can place insert, edit, delete button for each row.I’m using visual studio 2008 and sql server 2008 for this sample.In general, gridview control is used to populate the data in tabular format from different datasources and basically it derived from webcontrol class.We also create a Sql Data Source control populate the data source by a simple database query.