In rowupdating in

New Value(Index Of Column) sqlbefehl You wrote: "The Problem is not to find the controls. New Values(1) So make sure you set your gridview like this: I'm not seeing that but I did forget to add .tostring so you'll probably want to change it to e. To String If you're still getting both values then you can parse them out pretty easily by splitting them on the comma dim a() as string = e. Split(",") Protected Sub Grid View1_Row Updating(sender As Object, e As Grid View Update Event Args) Handles Grid View1. Row Index) Dim dt = CType(Session("mein Data Set"), Data Table) Dim connection String As String = Configuration Manager. Add With Value("@Listenart", "123") Dim a() As String = (CType((row.

I don´t know the names of the auto generated Grid View Textboxes." If you want to use the new values on Row Updating then forget about the controls and use e. I found if I set enable View State of the gridview to false I can get the NEW values of the like this: e.

Is Post Back Then Bind Data() End If If Zugangskontrolle() = True Then Grid View Abfrage() Else Response.

Edit Index = -1 'Bind data to the Grid View control. Close() End Sub End Class Private Sub Grid View1_Row Updating(sender As Object, e As Grid View Update Event Args) Handles Grid View1.

However, now I am all confused and lost with the Grid View. In the code below I have shown how you can extract the new values from the textboxes inside the Grid View.

Once, you got the values you just need to send them to the database.

Open() Dim sqlanweisung As String = "Select * FROM tbl Abgesandt WHERE Aktuell='1'" Dim sqlbefehl As New Sql Command(sqlanweisung, verbindung) Dim mein Data Set As New Data Table() Dim mein Adapter As New Sql Data Adapter(sqlbefehl) mein Adapter. New Edit Index Bind Data() End Sub Protected Sub Grid View1_Row Canceling Edit(sender As Object, e As Grid View Cancel Edit Event Args) Handles Grid View1. Edit Index = -1 Bind Data() End Sub Private Sub Bind Data() Grid View1. Data Bind() End Sub Protected Sub Grid View1_Sorting(sender As Object, e As Grid View Sort Event Args) Handles Grid View1. Dim sort Direction = "ASC" ' Retrieve the last column that was sorted.

New Values(1) End Sub Private Sub Grid View1_Row Updating(sender As Object, e As Grid View Update Event Args) Handles Grid View1.

New Values(1) End Sub You wrote: "The Problem is not to find the controls. Row Updating 'Retrieve the table from the session object. Connection Strings("Berichtsdurchlauf Connection String"). Connection String Dim verbindung As New Sql Connection(connection String) Dim sqlanweisung As String = "INSERT INTO tbl Abgesandt NA (Listenart, Verband) VALUES (@Listenart, @Verband)" Dim sqlbefehl As New Sql Command(sqlanweisung, verbindung) verbindung.

I don´t know the names of the auto generated Grid View Textboxes.

Close() End Sub Protected Sub Grid View1_Row Editing(sender As Object, e As Grid View Edit Event Args) Handles Grid View1. Dim dt = Try Cast(Session("mein Data Set"), Data Table) If dt Is Not Nothing Then 'Sort the data. View State("Sort Direction") = sort Direction View State("Sort Expression") = column Return sort Direction End Function Protected Sub Grid View1_Page Index Changing(sender As Object, e As Grid View Page Event Args) Handles Grid View1. Row Updating 'Retrieve the table from the session object. Connection Strings("Berichtsdurchlauf Connection String"). Connection String Dim verbindung As New Sql Connection(connection String) Dim sqlanweisung As String = "INSERT INTO tbl Abgesandt NA (Listenart, Verband) VALUES (@Listenart, @Verband)" Dim sqlbefehl As New Sql Command(sqlanweisung, verbindung) verbindung.

Leave a Reply