Grid View preview page where ID and Name have been displayed and EDIT or Delete also been designed for action. Step 2: Add a GridView control in your aspx file. Step 3: write a method in your aspx.cs codebehind to set the DataSource property of asp.net GridView control. We are using the above Nuget package to add Paging in our table-based gridview, the above page will help you in generating Bootstrap class based HTML for paging. custom grid view with server-side paging, sorting and searching.
GridView1.EditIndex = -1; No comments have been added to this article. In the above code, we are calling the database to get the results of Employee table, plus we are using GetPaged method, by passing page number as "p" and fetching 10 rows at a time. Allow Necessary Cookies & Continue dr["ID"] = NewID; The delete button is there for deleting one specific record from the grid view presentation. This control has various features for multiple types of presentation on the screen, we will cover it in this document in detail. Below is a Snapshot of Table Structure and Data in it. Binding any data source controls, like SqlDataSource. DataRow dr = dt.Rows[e.RowIndex];