Edit Index = -1 'Bind data to the Grid View control. Sql Command Dim sql As String Dim reader As System. Sql Command Dim sql3 As String Dim reader3 As System.

rowupdating asp-66rowupdating asp-9rowupdating asp-27

Add(New Data Column("Col1_ML", Get Type(String))) dt.

Add(New Data Column("Col1_PH", Get Type(String))) dt.

To cancel the update operation, set the collections, if necessary, before the values are passed to the data source.

A common way to use these collections is to HTML-encode the values supplied by the user before they are stored in the data source.

Add(New Data Column("Col1_Others", Get Type(String))) dt. Read() '---For each row g_Temp Staff Key = "0" Temp Staff Key = reader("staff_key") 'will not null g_selectstaffkey = Temp Staff Key g_selectpostkey = reader("post_key") g_selectstaffname = RTrim(reader("name_eng")) g_selectpostcode = RTrim(reader("post_code")) Using conn3 As New System.

Add(New Data Column("Col1_Shift Type", Get Type(Int32))) dt. Add(New Data Column("Col1_Submitted By", Get Type(Int32))) Dim dr As Data Row While reader.

Connection = conn2 sql = "SET DATEFORMAT dmy; SELECT * FROM XXXX " cmd. Execute Reader() Dim Temp Staff Key As Integer Dim Temp Post Key As Integer Dim Temp Shift Date As Date Time Dim Temp Start Time As Date Time Dim Temp End Time As Date Time Dim Temp SL As String Dim Temp Roster Key As Integer Dim Temp VL As String Dim Temp ML As String Dim Temp PH As String Dim Temp APH As String Dim Temp TOIL As String Dim Temp Others As String Dim Temp Shift Type As Integer Dim Temp Submitted By As Integer Dim dt As New Data Table() dt. Add(New Data Column("Staff Name", Get Type(String))) dt. Add(New Data Column("Post Code", Get Type(String))) dt. Add(New Data Column("Staff Key", Get Type(Int32))) dt. Add(New Data Column("Post Key", Get Type(Int32))) 'Monday dt. Add(New Data Column("Col1_Roster Key", Get Type(Int32))) dt. Add(New Data Column("Col1_Shift Date", Get Type(Date Time))) dt. Add(New Data Column("Col1_Start Time", Get Type(Date Time))) dt. Add(New Data Column("Col1_End Time", Get Type(Date Time))) dt. Add(New Data Column("Col1_SL", Get Type(String))) dt.

Add(New Data Column("Col1_VL", Get Type(String))) dt.

Follow this link for more details --While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference.

When I click on the edit button the update and cancel button appear.

I'm programmatically querying the db and i'm not using the smart tag of the gridview. Yes, i could see the controls in item template, but not in edititemtemplate.