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

databinding for multiple comboboxes

I have a 4 tab form each with different dataviews attached to a datagrid. On
the last tab, I have a dataview attached to a datagrid and 2 comboxes that
are bound to the same dataset representing 2 different columns in the dv.
When I create cbSecond.BindingContext = new BindingContext(); the combox
loads okay but the value does not change with the new row, nor do changes in
the combox propogate to the dv. (combobox 1 works okay as long as i don't do:
cbfirst.bindingContext = new BindingContext();). Instead I get a a form that
freezes when a new selection is made from the dropdown list in cb2. When the
first combobox value is changed, the second combox clears the textbox. I
have regnerated the dataset, the dataviews and deleted and reapplied the
datagrid numerous times. What is wrong with it?
Nov 17 '05 #1
1 1636
I have narrowed some of the problem down. When I moved the 2nd combox off of
the tab pain onto the parent form, everything works. So that leads to
believe that the tabcontol binding manager is the problem. So how do I fix
this? I already tried to create seperate binding contexts for each tabpage,
but that didn't appear to change anything.

"Kevin" wrote:
I have a 4 tab form each with different dataviews attached to a datagrid. On
the last tab, I have a dataview attached to a datagrid and 2 comboxes that
are bound to the same dataset representing 2 different columns in the dv.
When I create cbSecond.BindingContext = new BindingContext(); the combox
loads okay but the value does not change with the new row, nor do changes in
the combox propogate to the dv. (combobox 1 works okay as long as i don't do:
cbfirst.bindingContext = new BindingContext();). Instead I get a a form that
freezes when a new selection is made from the dropdown list in cb2. When the
first combobox value is changed, the second combox clears the textbox. I
have regnerated the dataset, the dataviews and deleted and reapplied the
datagrid numerous times. What is wrong with it?

Nov 17 '05 #2

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

Similar topics

0
by: Timothy White | last post by:
I have a Windows Form Which Displays one record at a time. The DataTable object which is bound to the Form Controls only contains the record that is being displayed. When I need to display a...
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...
1
by: Stijn Goris | last post by:
Hi all, I have 3 Comboboxes i want to bind with 3 different DatTables. I use this.cbxProductCategory.DataSource = myDataTable; this.cbxProductCategory.DisplayMember = "PTCA_DESCR";...
2
by: Hemang Shah | last post by:
Hello I've few questions regarding ADO & C#: 1) Is it possible to view tata from multiple tables in the Datagrid control ? Most of the examples I see are only for 1 table. 2) In...
1
by: TheMadHatter | last post by:
I have an array of a custom obj which I am trying to use in multiple comboBoxes without creating multiple copies, but if I put the datasource of the comboboxes to the same array, then at runtime...
4
by: ECathell | last post by:
I am trying to databind 2 combo boxes to the same datasource but different fields using the same lookup table. The information in combobox2 is duplicating combobox 1(ie it appears to be gathering the...
2
by: Matt | last post by:
Hi all, me again! :) I've now got an issue with combo boxes. Basically, I have a number of items that I want a user to pick from a single list. It's basically along the lines of: Fruit 1: ...
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...
2
by: Nathan Sokalski | last post by:
I have a Repeater that uses a DataSource that has multiple fields. When the values of these fields is displayed in the Repeater, there are fields that are used in combination with other fields as...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.