Asp net grid rowupdating

before that i want just using Find control and casting and then retrieving all lot code. If values are same they could notify user to change the value(give new cell value). Every one can use it to compare the new value with old ones.Dim dt = CType(Session("dt"), Data Table) 'Update the values. Edit Index = -1 'Bind data to the Grid View control. Sql Command Dim sql As String Dim reader As System. I did some google searches, and there were examples out there but it just isn't making sense. Hi, I would first suggest that you use the Template Columns instead of the Bound Columns this way you are not dependent on the index/position of the column in the Grid View. In the code below I have shown how you can extract the new values from the textboxes inside the Grid View. But I have no idea how to get those value when doing Row Editing & Row Updating. Bind Data() End Sub Protected Sub Grid View1_Row Updating(By Val sender As Object, By Val e As Grid View Update Event Args) 'Retrieve the table from the session object.

Add(New Data Column("Col1_APH", Get Type(String))) dt. I am having trouble 'saving' the changes the user makes when editing text ina field on a gridview. When the user clicks EDIT then makes a change or two, then UPDATE, the changes are lost. Sql Command Dim sql3 As String Dim reader3 As System. 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.

Leave a Reply