473,245 Members | 1,519 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,245 software developers and data experts.

Problem with ComboBox

Hi Everyone,

I'll try to explain the process I'm following, I'm new to this so I'm
triying the easy way first, probably the lasyest too!

I created a new Project, drag in to it a SQLConnection, configured,
dragged an Dataadapter per each table I need it, then generated the
dataset, after that, I stablished the relations between tables, then,
went over to the datasources, choose the parent datasource and clicked
on the + sign, it displayed me every field on that table as well as the
related tables, until here everything goes fine, after that I change
the the way I want the controls to be displayed from datagrid to form
then drag/drop the source over the form and run the form, everything is
fine until here, here's the little problem, I have a field called
'empid' wich is supposed to be a comboBox, I click over it and it
displays nothing, I went back and stablish a datasource for it, value
to display, etc, etc then, run the form again and it does display the
numbers but when I start going over them it begins to change everyvalue
on the combobox, per example, when the form is ran for the first time
it displays the values 1001, 1002 and 1003, then while it's running I
choose the diferent values and it displays them right but then when I
click on the combobox there's number 1, choose a different value then
when I go back it's showing a number 3 but numbers 1001 and 1002 are
gone, I close the form and run it again and the numbers show fine
again.

Hope I explained myself, if there's any advice on what it is what I am
doing wrong please let me know, thanks in advance!

Aug 11 '06 #1
4 1794
JJGarcia,

You have tried to explain yourself, but there are thousands of
implementations of a combobox in a datagrid (It is not standard in a
datagrid). That makes it difficult to help you with this.

As you would use a DataGridView, than it would probably be easier to help,
but the later is Net 2.0 and I assume that you use Net 1.x.

Cor

"JJGarcia" <jo***********@gmail.comschreef in bericht
news:11**********************@b28g2000cwb.googlegr oups.com...
Hi Everyone,

I'll try to explain the process I'm following, I'm new to this so I'm
triying the easy way first, probably the lasyest too!

I created a new Project, drag in to it a SQLConnection, configured,
dragged an Dataadapter per each table I need it, then generated the
dataset, after that, I stablished the relations between tables, then,
went over to the datasources, choose the parent datasource and clicked
on the + sign, it displayed me every field on that table as well as the
related tables, until here everything goes fine, after that I change
the the way I want the controls to be displayed from datagrid to form
then drag/drop the source over the form and run the form, everything is
fine until here, here's the little problem, I have a field called
'empid' wich is supposed to be a comboBox, I click over it and it
displays nothing, I went back and stablish a datasource for it, value
to display, etc, etc then, run the form again and it does display the
numbers but when I start going over them it begins to change everyvalue
on the combobox, per example, when the form is ran for the first time
it displays the values 1001, 1002 and 1003, then while it's running I
choose the diferent values and it displays them right but then when I
click on the combobox there's number 1, choose a different value then
when I go back it's showing a number 3 but numbers 1001 and 1002 are
gone, I close the form and run it again and the numbers show fine
again.

Hope I explained myself, if there's any advice on what it is what I am
doing wrong please let me know, thanks in advance!

Aug 12 '06 #2
o.k, sorry, what I will like to do is this, on my detail form I will
like to be able to do a search on the detail form and as I find the
searched record on the combobox(be able to search or just choose a
record from the list) the detail and datagrid will display me the
record, as I mentioned, I have the fields already related, I tried with
the datagrid view but as I am totally new to this programming world I
wasn't able to make it work for me the way I wanted, I mean, i do was
displaying the records but when I was modifiying the records it wont
save the changes, the instruction i'm using for save any changes is
[sqldataadapter.update(datataset, "my_table")].

In resume, what I need to do is to be able to use the combobox as a
lookup device but the way I have configure it right now(i'm using the
RAD way...!) seems no to be working, it does display the records but as
I choose them the number on the combobox changes to a number that I
don't know where is getting it from.

By the way, another question, how do I change the name of the fields
that are being displayed on the datagrid beacuse right now they are
displaying the name that's on the table so it is a weird name.

thanks in advance for your help

JJGarcia

Cor Ligthert [MVP] wrote:
JJGarcia,

You have tried to explain yourself, but there are thousands of
implementations of a combobox in a datagrid (It is not standard in a
datagrid). That makes it difficult to help you with this.

As you would use a DataGridView, than it would probably be easier to help,
but the later is Net 2.0 and I assume that you use Net 1.x.

Cor

"JJGarcia" <jo***********@gmail.comschreef in bericht
news:11**********************@b28g2000cwb.googlegr oups.com...
Hi Everyone,

I'll try to explain the process I'm following, I'm new to this so I'm
triying the easy way first, probably the lasyest too!

I created a new Project, drag in to it a SQLConnection, configured,
dragged an Dataadapter per each table I need it, then generated the
dataset, after that, I stablished the relations between tables, then,
went over to the datasources, choose the parent datasource and clicked
on the + sign, it displayed me every field on that table as well as the
related tables, until here everything goes fine, after that I change
the the way I want the controls to be displayed from datagrid to form
then drag/drop the source over the form and run the form, everything is
fine until here, here's the little problem, I have a field called
'empid' wich is supposed to be a comboBox, I click over it and it
displays nothing, I went back and stablish a datasource for it, value
to display, etc, etc then, run the form again and it does display the
numbers but when I start going over them it begins to change everyvalue
on the combobox, per example, when the form is ran for the first time
it displays the values 1001, 1002 and 1003, then while it's running I
choose the diferent values and it displays them right but then when I
click on the combobox there's number 1, choose a different value then
when I go back it's showing a number 3 but numbers 1001 and 1002 are
gone, I close the form and run it again and the numbers show fine
again.

Hope I explained myself, if there's any advice on what it is what I am
doing wrong please let me know, thanks in advance!
Aug 12 '06 #3
JJGarcia,

Maybe I should ask my question more expliciet because you did not answer
that.

What VB version are you using and what complex data control, I am in doubt
that it is a datagrid as you wrote?

Cor

"JJGarcia" <jo***********@gmail.comschreef in bericht
news:11**********************@p79g2000cwp.googlegr oups.com...
o.k, sorry, what I will like to do is this, on my detail form I will
like to be able to do a search on the detail form and as I find the
searched record on the combobox(be able to search or just choose a
record from the list) the detail and datagrid will display me the
record, as I mentioned, I have the fields already related, I tried with
the datagrid view but as I am totally new to this programming world I
wasn't able to make it work for me the way I wanted, I mean, i do was
displaying the records but when I was modifiying the records it wont
save the changes, the instruction i'm using for save any changes is
[sqldataadapter.update(datataset, "my_table")].

In resume, what I need to do is to be able to use the combobox as a
lookup device but the way I have configure it right now(i'm using the
RAD way...!) seems no to be working, it does display the records but as
I choose them the number on the combobox changes to a number that I
don't know where is getting it from.

By the way, another question, how do I change the name of the fields
that are being displayed on the datagrid beacuse right now they are
displaying the name that's on the table so it is a weird name.

thanks in advance for your help

JJGarcia

Cor Ligthert [MVP] wrote:
>JJGarcia,

You have tried to explain yourself, but there are thousands of
implementations of a combobox in a datagrid (It is not standard in a
datagrid). That makes it difficult to help you with this.

As you would use a DataGridView, than it would probably be easier to
help,
but the later is Net 2.0 and I assume that you use Net 1.x.

Cor

"JJGarcia" <jo***********@gmail.comschreef in bericht
news:11**********************@b28g2000cwb.googleg roups.com...
Hi Everyone,

I'll try to explain the process I'm following, I'm new to this so I'm
triying the easy way first, probably the lasyest too!

I created a new Project, drag in to it a SQLConnection, configured,
dragged an Dataadapter per each table I need it, then generated the
dataset, after that, I stablished the relations between tables, then,
went over to the datasources, choose the parent datasource and clicked
on the + sign, it displayed me every field on that table as well as the
related tables, until here everything goes fine, after that I change
the the way I want the controls to be displayed from datagrid to form
then drag/drop the source over the form and run the form, everything is
fine until here, here's the little problem, I have a field called
'empid' wich is supposed to be a comboBox, I click over it and it
displays nothing, I went back and stablish a datasource for it, value
to display, etc, etc then, run the form again and it does display the
numbers but when I start going over them it begins to change everyvalue
on the combobox, per example, when the form is ran for the first time
it displays the values 1001, 1002 and 1003, then while it's running I
choose the diferent values and it displays them right but then when I
click on the combobox there's number 1, choose a different value then
when I go back it's showing a number 3 but numbers 1001 and 1002 are
gone, I close the form and run it again and the numbers show fine
again.

Hope I explained myself, if there's any advice on what it is what I am
doing wrong please let me know, thanks in advance!

Aug 13 '06 #4
Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727

Installed Edition: Professional

Cor Ligthert [MVP] wrote:
JJGarcia,

Maybe I should ask my question more expliciet because you did not answer
that.

What VB version are you using and what complex data control, I am in doubt
that it is a datagrid as you wrote?

Cor

"JJGarcia" <jo***********@gmail.comschreef in bericht
news:11**********************@p79g2000cwp.googlegr oups.com...
o.k, sorry, what I will like to do is this, on my detail form I will
like to be able to do a search on the detail form and as I find the
searched record on the combobox(be able to search or just choose a
record from the list) the detail and datagrid will display me the
record, as I mentioned, I have the fields already related, I tried with
the datagrid view but as I am totally new to this programming world I
wasn't able to make it work for me the way I wanted, I mean, i do was
displaying the records but when I was modifiying the records it wont
save the changes, the instruction i'm using for save any changes is
[sqldataadapter.update(datataset, "my_table")].

In resume, what I need to do is to be able to use the combobox as a
lookup device but the way I have configure it right now(i'm using the
RAD way...!) seems no to be working, it does display the records but as
I choose them the number on the combobox changes to a number that I
don't know where is getting it from.

By the way, another question, how do I change the name of the fields
that are being displayed on the datagrid beacuse right now they are
displaying the name that's on the table so it is a weird name.

thanks in advance for your help

JJGarcia

Cor Ligthert [MVP] wrote:
JJGarcia,

You have tried to explain yourself, but there are thousands of
implementations of a combobox in a datagrid (It is not standard in a
datagrid). That makes it difficult to help you with this.

As you would use a DataGridView, than it would probably be easier to
help,
but the later is Net 2.0 and I assume that you use Net 1.x.

Cor

"JJGarcia" <jo***********@gmail.comschreef in bericht
news:11**********************@b28g2000cwb.googlegr oups.com...
Hi Everyone,

I'll try to explain the process I'm following, I'm new to this so I'm
triying the easy way first, probably the lasyest too!

I created a new Project, drag in to it a SQLConnection, configured,
dragged an Dataadapter per each table I need it, then generated the
dataset, after that, I stablished the relations between tables, then,
went over to the datasources, choose the parent datasource and clicked
on the + sign, it displayed me every field on that table as well as the
related tables, until here everything goes fine, after that I change
the the way I want the controls to be displayed from datagrid to form
then drag/drop the source over the form and run the form, everything is
fine until here, here's the little problem, I have a field called
'empid' wich is supposed to be a comboBox, I click over it and it
displays nothing, I went back and stablish a datasource for it, value
to display, etc, etc then, run the form again and it does display the
numbers but when I start going over them it begins to change everyvalue
on the combobox, per example, when the form is ran for the first time
it displays the values 1001, 1002 and 1003, then while it's running I
choose the diferent values and it displays them right but then when I
click on the combobox there's number 1, choose a different value then
when I go back it's showing a number 3 but numbers 1001 and 1002 are
gone, I close the form and run it again and the numbers show fine
again.

Hope I explained myself, if there's any advice on what it is what I am
doing wrong please let me know, thanks in advance!
Aug 13 '06 #5

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

Similar topics

1
by: Kaneda | last post by:
Hello everyone! I have some weird(?) problems, and I am not quite sure if there are due to my errors or maybe a limitation in the .Net framework. I have a ComboBox I need to fill with the...
0
by: Kaneda | last post by:
Hello everyone! I have some weird(?) problems, and I am not quite sure if there are due to my errors or maybe a limitation in the .Net framework. I have a ComboBox I need to fill with the...
6
by: Omar | last post by:
When I try to databind my comboBox (specifically field "emplcode") to a filled dataset , the contents of the comboBox displays a bunch of "System.Data.DataRowView". I assume the amount of times...
0
by: Jax | last post by:
I am using a class that inherits from the DataGridTextBoxColumn. It adds a combo box into the column where it displays a selection of choices. The problem I have is that when this comboBox loses...
3
by: TT (Tom Tempelaere) | last post by:
Hay there, I'm writing my own DataGridComboBoxColumn because .NET 1.1 does not have one (I hope .NET 2.0 supplies one). I based it on this article:...
0
by: tupolev | last post by:
Hi, I already post this item but now I know whats wrong: I want to allow the user to edit the items in a combobox. The problem is that the textchange event works just one time (for the first...
30
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
1
by: amber | last post by:
I'm having an issue with a combobox that is making no sense to me at all. I have a form with several comboboxes/textboxes. The values in these boxes are based on a datarowview, which is based on...
1
by: Aleksey Timonin | last post by:
Hi guys, I have a comboBox binded to DataTable: comboBox.DataSource = MyDataTable; comboBox.ValueMember = "id"; comboBox.DisplayMember = "id";
6
by: RamonPV | last post by:
Hello: I am having a problem with to linked comboxes in IE7. Here is my problem that is ONLY ocurring in IE7: I have javascripts functions to populate the second of 2 comboxes given the selected...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.