Get an insight of Chakras, Kundalini, Kriyas, and Meditations. 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.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.The Bind Grid() method is our own function that we will create later on.
In order to develop a test web form create a new web site in VS. Set various properties of the Bound Fields as shown in the following table: Here, we call Bind Grid() method if the web form is being served as a result of first request.
The sample demonstrates data source from both database and memory.
For this sample to work, you must install the Sql Server 2008 R2 Express.
Now let’s create a method for executing the Update or Insert.
Six of those paramaters basically comes from the Text Box values that were entered in the page. Invalid Cast Exception: Unable to cast object of type 'System.
I will not go in the detail about the environment and developing requirements, if interested jump op to my other posts.