Monday, September 12, 2011

Working with GridView in Code Behind

1. I add GridView into my .aspx page. My database table consist with four columns(Id, FirstName, LastName, DateCreated)

2. Bind your Grid
   In this example I used Microsoft Enterprise Library. For further details you can access my previous post, Working with SqlServer using Microsoft Enterprise Library

3. You can add data while binding data in your grid. In this example I add a java script function to each row.     

4. Allow to change your page index. 

5. I add two command field (Edit & Delete) into the Grid. You can add any command fields into the Grid. 

6. Allow to delete row data

No comments:

Post a Comment