DaTa GrId UpDaTe!!!

elf

Active member
Joined
Jun 4, 2003
Messages
37
i am now using a datagrid to display my data from my database...
but i wanna user to be able to edit , update and cancel the information..

how should i go bout doing it...can somebody guides mi...
the code i have for edit and cancel are below...can anyone tells mi whether ite rite anot...and if its rite how should i go bout doing the update part...i have visited many sites but i dun understan....thanks

Source Code
------------------------------------------------------------------------------------
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
OleDbDataAdapter1.Fill(DataSet41)
DataGrid1.DataBind() Put user code to initialize the page here

End Sub

Sub DataGrid1_Edit(ByVal sender As Object, ByVal e As DataGridCommandEventArgs)
DataGrid1.EditItemIndex = e.Item.ItemIndex
OleDbDataAdapter1.Fill(DataSet41)
DataGrid1.DataBind()

End Sub

Sub DataGrid1_Cancel(ByVal sender As Object, ByVal e As DataGridCommandEventArgs)
DataGrid1.EditItemIndex = -1
OleDbDataAdapter1.Fill(DataSet41)
DataGrid1.DataBind()
End Sub
 
Back
Top