Hi everyone,
My program reads data from a DataBase, then populates some ComboBoxes with
data from each Table respectively, filtering the data in each ComboBox
according to the item selected in the preceding ComboBox.
(...Thanks guys for the guidance in that area...)
The resulting filtered table displays the filtered result in a DataGrid.
I want to be able to edit any errors found in the text displayed. (This part
works).
I set the DataGrid to Enable the Update button when the cell is clicked.
I then have the Update button set itself to Enabled=False after performing
the Update.
Then problem is at this point. If I click the Update button, and then find
another error in the text, I can not get the Update button to Enabled=True
again.
Private Sub btnUpdate_Click (ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnUpdate.Click
'Update the DataBase
Try
daText.Update(d sText)
Catch ex As Exception
MsgBox(ex.ToStr ing)
End Try
btnUpdate.Enabl ed = False
End Sub
Private Sub dgText_Click(By Val sender As Object, ByVal e As
System.EventArg s) Handles dgText.Click
'Enable the Update button
btnUpdate.Enabl ed = True
End Sub
Thanks in advance,
Gary 1 1017
Try
'Stuff
Catch ex As Exception
'Stuff
Finally
'Re-Enable the Button
End Try
OHM
Didymus wrote: Hi everyone,
My program reads data from a DataBase, then populates some ComboBoxes with data from each Table respectively, filtering the data in each ComboBox according to the item selected in the preceding ComboBox. (...Thanks guys for the guidance in that area...)
The resulting filtered table displays the filtered result in a DataGrid.
I want to be able to edit any errors found in the text displayed. (This part works). I set the DataGrid to Enable the Update button when the cell is clicked. I then have the Update button set itself to Enabled=False after performing the Update.
Then problem is at this point. If I click the Update button, and then find another error in the text, I can not get the Update button to Enabled=True again.
Private Sub btnUpdate_Click (ByVal sender As System.Object, ByVal e As System.EventArg s) Handles btnUpdate.Click
'Update the DataBase
Try
daText.Update(d sText)
Catch ex As Exception
MsgBox(ex.ToStr ing)
End Try
btnUpdate.Enabl ed = False
End Sub
Private Sub dgText_Click(By Val sender As Object, ByVal e As System.EventArg s) Handles dgText.Click
'Enable the Update button
btnUpdate.Enabl ed = True
End Sub
Thanks in advance,
Gary
--
Best Regards - OHM
O_H_M{at}BTInte rnet{dot}com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: cwbp17 |
last post by:
Have two tables that have a FK relationship on ID column.
Have one datagrid that displays all of the columns of both tables.
What's the best approach on updating a row from the datagrid back to the
database?
I've used the following code for the DataGird1_UpdateCommand
Option1
|
by: junglist |
last post by:
Hi guys,
I've been trying to implement an editable datagrid and i have been
succesful up to the point where i can update my datagrid row by row.
However what used to happen was that once i updated one row, all of
them were updated so i immediatelly figured out that i have to include
the id of every entry in the update statement. This is where...
|
by: cwbp17 |
last post by:
I'm having trouble updating individual datagrid cells.
Have two tables car_master (columns include Car_ID, YEAR,VEHICLE) and
car_detail (columns include Car_ID,PRICE,MILEAGE,and BODY);both tables have a
FK relationship on CAR_ID
so the oracledataadapter1 select statement(CommandText) is:
select car_master.car_id,...
|
by: jaYPee |
last post by:
does anyone experienced slowness when updating a dataset using
AcceptChanges?
when calling this code it takes many seconds to update the database
SqlDataAdapter1.Update(DsStudentCourse1)
DsStudentCourse1.AcceptChanges()
i'm also wondering because w/ out AcceptChanges the data is still save
into the database and it is now faster.
|
by: cwbp17 |
last post by:
Have two tables that have a FK relationship on ID column.
Have one datagrid that displays all of the columns of both tables.
What's the best approach on updating a row from the datagrid back to the
database?
I've used the following code for the DataGird1_UpdateCommand
Option1
| |
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |