473,396 Members | 2,055 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,396 software developers and data experts.

Databinding to combobox using vs.net

Hi,
I got two tables 1) Contacts 2) Customer
The contacts table has a primary key contactID(AutoIncrement) and all
his personal information.
The Customer is a contact too but with separate additional fields in
the table.
I join the relationship using tblCOntactsID = tblCustomeriD.
Now my question is I am trying to develop a windows form automatically
using VS.NET
I am binding all the fields from both the tables to the windows form
fields.
Is there a way where I can just bind and perform all the add, delete,
Update operations without writing any code in the program.
If I press add button all the fields shud be added to contacts with
contactID incremented automatically and also simulataneously that
information should go in to the customer table for that particular ID.
Is there a way to do this using dataadapter, dataset tools.
I can do this hard coding by writing the code for the add event. But
can I do it automatically after binding.
Any kind of help will be appreciated
Nov 20 '05 #1
2 890
On the Add button, just call Update first, then call the AddNew method of
your bindingManager

--
W.G. Ryan MVP Windows - Embedded

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/...ity/newsgroups
"Lolli man" <co************@yahoo.com> wrote in message
news:51**************************@posting.google.c om...
Hi,
I got two tables 1) Contacts 2) Customer
The contacts table has a primary key contactID(AutoIncrement) and all
his personal information.
The Customer is a contact too but with separate additional fields in
the table.
I join the relationship using tblCOntactsID = tblCustomeriD.
Now my question is I am trying to develop a windows form automatically
using VS.NET
I am binding all the fields from both the tables to the windows form
fields.
Is there a way where I can just bind and perform all the add, delete,
Update operations without writing any code in the program.
If I press add button all the fields shud be added to contacts with
contactID incremented automatically and also simulataneously that
information should go in to the customer table for that particular ID.
Is there a way to do this using dataadapter, dataset tools.
I can do this hard coding by writing the code for the add event. But
can I do it automatically after binding.
Any kind of help will be appreciated

Nov 20 '05 #2
Lolliman,

You can try to use the dataform wizard, however I am quiet sure that you
will not be happy from the result that.

I am not even sure if in that is including the updates of the database. For
the rest there is no non beta Microsoft product that does this automaticly
for you.

It would be strange, because for this is Office Access in my opinion.

I hope this helps?

Cor
Nov 20 '05 #3

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

Similar topics

3
by: Paul Fairless | last post by:
Customers table - contains Columns: CustID, Surname, Forename, TtlID Titles table - contains Columns: TtlID, Title TtlID is a Foreign Key in the Customers table. I have a Form frmCustomers...
0
by: Richard | last post by:
Hi, I'm having issues with DataBinding. I have a Form with two data bound comboboxes on it. When you select something in one combobox I may {or may not} want to change the selected item in the...
13
by: Michael Maes | last post by:
Hi, I have a UserControl containing some controls of which one is a ComboBox. All the InternalControls are Private and some are allowed to be accessed through Public Methods. One of the things I...
1
by: Gary Shell | last post by:
I have a pair of combo boxes on a form. Both have their SelectedValue property bound to a column on a table called "Input_Output". One column is called "Class" and the second is called "SubClass"....
0
by: Kevin Hodgson | last post by:
I have a ComboBox and a TextBox bound to a Dataset/datatable returned from a SQL Database. The databinding is set in Design Mode. Everything works fine on my initial fill, and I get the correct...
3
by: Dan Slaby | last post by:
I have a webservice that I want to populate a combobox on a windows form. The webservice creates the correct XML output, but when I attempt to bind it to a combobox I get this error: Additional...
5
by: Peter M. | last post by:
I'm struggling with combobox databinding with something I consider a bug... I'm binding my combobox to an array of structs. The struct exposes two public properties, ID and Name, to be used as...
5
by: Dennis | last post by:
I am trying to create a form using databinding to a dataset and one of the fields requires the user to select from a list of optons. Any hints on how to do this other than bind the field to a...
7
by: JTC^..^ | last post by:
When i attempt to bind to the "Text" and "Value" property of a combobox on a windows form the value is reset when I leave the combobox. The comboboxes contain the correct Text and Values. I know...
0
by: theleshie | last post by:
Hi, I am creating an application which dynamically creates forms depending on the information held in a dataset (which also includes the data the application itself uses). As part of dynamically...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
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,...

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.