Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inputting data with tablestyles present. 1

Status
Not open for further replies.

Turpis

Programmer
Apr 16, 2002
151
I need some help to get moving in the right direction. I have a form with a combobox and and datagrid on it. The user selects a vendor type out of the combo box and then the datagrid is filled with vendors of that type from a filter dataview. The datagrid has tablestyles in use to hide the column that has the vendor type so when the user types a new row of information and hits the save button the record disappears because it never got an typeID assigned because I have it hidden. The information made it to the database just fine, but without data in the typeID column. I need to be able to recognize when a user is entering in a new row of information and auto-input the typeId from the combobox in the typeID column that is hidden from view. Any ideas? This is the first time I have tried using a datagrid interactively rather than to just to display data.

Charles
Quality Assurance/Developer
 
try setting the defaultvalue of the appropriate column in the dataset you use.

ds.tables(0).columns("typeid").defaultvalue = combobox.text

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Thanks Christiaan!! Worked like a charm.

Charles
Quality Assurance/Developer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top