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

vb.net - setting combobox tag to dataset value

3
Hi

I'm populating a combobox using a dataset and dataadaptor. When the combobox is filled it selects the first value in the database (this is what I want it to do).

So I've set the text (DisplayMember = "GradeDescription") and the value to be the ID (ValueMember = "ContractID").

But what I want to do is set the combobox's TAG to the first selected value in the combobox, (the value that is selected). Then as I change the value in the combobox, the TAG is also changed to equal the newly selected ContractID.

Can anyone help me please.

Dave
Apr 10 '07 #1
1 3028
daveg
3
just bumping the msg back to the top in the hope for a response.
Apr 10 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Fred | last post by:
Hi, I am having a problem setting a combobox value in code on form load using comboBox.SelectedValue method. The code below when debugging show the combobox equal to an undefined value. The...
2
by: alpesh sharma via .NET 247 | last post by:
(Type your message here) how to retrieve dataset value one by one in an array of string. -------------------------------- From: alpesh sharma ----------------------- Posted by a user from .NET...
1
by: Kiran | last post by:
Hi, I have user control that I am using it for a Web Page. The User Control has a Dataset declared as class variable. When I call a function of that User Control from Web page, I am...
2
by: Andy G | last post by:
How can I check this for null? dsPrsn.Tables(0).Rows(0)("WORK_STATE") I tried If IsDbNull(dsPrsn.Tables(0).Rows(0)("WORK_STATE")) Then it seems not too work. I am attempting to check this field...
1
by: andrewbda | last post by:
I have a combo box in a subform that will have different options depending on values in the main form. I would like the combo box to default to the first value in the list. Any help would be...
5
by: Rotsey | last post by:
Hi, I have a combobox that when I set the SelectedIndex to -1 it sets to 0. The combobox Items property says there is 20 items in it. Anyone know why this could be please? rotsey
4
by: hhak | last post by:
Hi all, Im pretty new to C#, im trying to assign a combobox selected value to a int variable. int number; combobox has items added (1,2,3,4,...9) when i select a number from the combobox i...
2
by: Infog | last post by:
Using this code, the display member of the combo box is displaying the text "System.Data.DataViewManagerListItemTypeDescriptor". Huh??? The first block of code gets the data from the database, and...
2
by: vasanth chandrasekaran | last post by:
Hai All, I try to insert the Dataset value in Exiting excel file by using OLEDB provider.But i face error messagge in objCmd.ExecuteNonQuery(); The error is :Syntax error in INSERT...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
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
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.