Now at page load I have called the method, so after that the grid will fill as in: Now click on the Edit button that calls the edit method as shown in the following grid: If you click on the "Cancel" button then the editcancel method will be called and edit mode will be cancelled.
To do that, instead of creating four Stored Procedures to perform these tasks I will create a single Stored Procedure to satisfy my requirements and I will access it in code behind depending on the action performed by the end user on a button click. Net) developers faced a problem when they want to implement edit functionality within a Grid View. The problem is developers can not understand how to populate or Bind data into Check Box List within the Grid View in Edit Mode. Now first Bind or Load the Grid View Control: C# Code: Protected Sub Page_Load(sender As Object, e As System. Load If Not Is Post Back Then Bind_Check Box List() End If End Sub Private Sub Bind_Check Box List() Dim dt As Data Table Dim SQL As String = "SELECT P. I have used the @Action variable and assigned the string to them and according to the parameter ed to the Stored Procedure the specific block will be executed because I have kept these blocks or conditions in nested if else if conditional statements."The most important thing is that I have assigned null to each variable to avoid the effect on the parameter ed to the Stored Procedure because we are ing a different number of parameters but not the same number of parameters to the Stored Procedure to perform these tasks." In the sample code above I have used the two string queries for giving the Stored Procedure name and the constr for storing the connection from the web.config file and another thing is that I have used a hidden field by which I am ing the action values that are required to our Stored Procedure.