473,387 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Edit, Update, Delete DataGrid Problem


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

--
jinhy82Posted from http://www.pcreview.co.uk/ newsgroup acces

Nov 19 '05 #1
0 1011

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: rkbnair | last post by:
Is there any way to display an image button instead of the traditional Edit/Update/Cancel push button in a datagrid (with bound data)?
4
by: drakuu | last post by:
Hello there, I have DataGrid with some records and I would like to edit it right in the datagrid using the built in commands. I can't figure out a way to pass to the SQL query the record ID...
9
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the...
0
by: lucindaa | last post by:
Hi EveryBody, i have a problem in setting the column type of datagrid dynamically in C# .Net Windows App. i am generating the grid automatically by assigning datasource of a datatable the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.