Edit, Update, Delete DataGrid Problem

Joined
Jun 6, 2005
Messages
2
Reaction score
0
Hello! I am using DataGrid to display details from Ms Access. Few features such as Edit, Update and Delete are added, but they did not function. Can anyone help me? Thank you very much!!!
For the update function, am I suppose to write the commane : UPDATE <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 name for the textbox?

Here is the sub functions source code:

Sub DataGrid_Edit(ByVal obj As Object, ByVal e As 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 As DataGridCommandEventArgs)
DataGrid.EditItemIndex = -1
DataGrid.DataBind()
'BindGrid()
End Sub


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

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

Similar Threads

Dynamic BoundColumn 2
DataGrid Edit Problem 9
Difference 2
Datagrid problem :( 1
DropDownList DataGrid 1
MDB Database won't update 4
Hide/Show EditCommandColumn In DataGrid 0
BoundColumn TextBox 2

Top