473,548 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataBinding & Table Events

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 other combobox. For reasons beyond the scope of this post I need to change the second comboboxe's selected index from within a ColumnChanging event handler. So, inside a ColumnChanging event handler I change the value of the column that is bound to the second combobox. This is not working well at all; it appears that the column that is bound to the second combobox does change but the GUI does not update the combobox to reflect the change. I'm not quite certain where the issue is -other than that it is a DataBinding issue- so I have several questions:

1) Both comboboxes represent a DayOfWeek {ComboBox.Items collection has Sun, Mon, ... Sat} and so are being stored on disk as an integer in the range 0-6. What combobox property should I bind the DataColumn to - SelectedIndex? SelectedValue? If SelectedValue then what do I need to do with ValueMember and how do I keep SelectedValue set to the correct value?

2) What can I "legally" do inside of RowChanging and ColumnChanging events? Is it legal for me to change the value of another column on the same DataRow from within a ColumnChanging event? Can I remove the target row from within a RowChanging event?
--Richard
Nov 15 '05 #1
0 1510

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

Similar topics

6
6722
by: eye5600 | last post by:
Is there a cure for the problems using databinding with a DateTimePicker? I find that a) sometimes it works, sometimes it doesn't, and b) it fails silently causing all databinding on the DataSet to fail with a error message. Help!
4
4197
by: dtblankenship | last post by:
Hello everyone, I know this question has been asked many times in the forums, and after spending a few days reading, I am still confused as to the answer. I have a ListBox (lstBox), SqlConnection (sqlConnection), SqlDataAdapter (daLookupData), SqlDataAdapter (daData), DataSet (dsLookupData), and DataSet (dsData), all created via the IDE...
3
3139
by: Kevin Swanson | last post by:
I'm writing what should be a very simple app against an Oracle database. The app has a number of user controls, any one of which is loaded into a main display page using the loadControl method, depending on which menu item a user selects. Each of these controls follows the same basic pattern: Get a dataset from the database and then display...
3
7749
by: Alec MacLean | last post by:
Hi everyone, I have a ComboBox that when changed, calls a method to change the content of a ListBox. I'm also using the Listbox's SelectedIndexChanged event to change other control values on the form. (It's a Company -> People -> Personal Data relationship) When I bind my datasource to the ListBox, I find that the
2
1410
by: Kalpesh | last post by:
Hello, I am facing a design problem here & need your expert design advice on this. Scenario: I have a class called Vendor - which has several simple attributes like Name, Address etc Now, each vendor has some attributes - which are not "simple" Basically, they can be an instance of another class
9
2295
by: Nathan Sokalski | last post by:
I have a very simple UserControl which contains an Image and a Label, which I use to display an image with a caption. I am using this control inside a DataList, setting the two Public variables using attributes in the *.aspx page. Everything displays great for the initial load, but whenever I try to add or delete an item (I have controls to do...
2
2241
by: mikeachamberlain | last post by:
Hi. I have an <asp:Imagecontrol in which I am databinding the ImageURL attribute. The URL is another ASPX page that provides the binary source of the image, The problem is that ASP.NET is insisting on HTML encoding the URL string, so the ampersands in the querystring are converted to &amps. As a simple example of this, consider the...
7
2583
by: Vlado Jasovic | last post by:
Hello, I'm using typed dataset for databinding to windows controls and I'm having some problems. I'm trying to move all business logic to datatable column_changing events and the problem that I'm having is when I change some other column, control value doesn't update immediately until I call endcurrentedit on bindingmanager which doesnt...
3
1876
by: Peter | last post by:
Hi! I am having some very strange behavior with my databound controls. It's taken a long time to isolate exactly what is provoking the problem, but I'm still leagues away from solving it. I have a DataView which filters a DataSet. Bound to this dataview is a ListBox, via its DataSource property. The DisplayMember is the name property of...
0
7438
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7707
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7951
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7466
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7803
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6036
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5362
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5082
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3475
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.