Edit, Update, Delete DataGrid Problem

J

jinhy82

Hello! I am using DataGrid to display details from Ms Access. Fe
features such as Edit, Update and Delete are added, but they did no
function. Can anyone help me? Thank you very much!!!
For the update function, am I suppose to write the commane : UPDAT
<tablename> SET = "..."?
As I am using the "EditCommandColumn", so when I press the "Edit" link
everyfield will changed to textbox form, may I know what is that nam
for the textbox?

Here is the sub functions source code:

Sub DataGrid_Edit(ByVal obj As Object, ByVal e A
DataGridCommandEventArgs)
Dim DBACmd As New OleDbDataAdapter(SQLCmd, DBConn)
DataGrid.EditItemIndex = e.Item.ItemIndex
Response.Write(DataGrid.EditItemIndex.ToString)
DataGrid.DataBind()
End Sub



Sub DataGrid_Update(ByVal obj As Object, ByVal e A
DataGridCommandEventArgs)
DataGrid.EditItemIndex = -1
DataGrid.DataBind()
'BindGrid()
End Sub


Sub DataGrid_Cancel(ByVal obj As Object, ByVal e A
DataGridCommandEventArgs)
DataGrid.EditItemIndex = -1
DataGrid.DataBind()
'BindGrid()
End Su
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top