473,671 Members | 2,113 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataBinding using Strongly Typed Datasets. Binding to a DateTimePicker and Combobox - Focus on Leave bug

When using a strongly typed dataset (generated from the Visual Studio IDE
from an XSD file) and databinding I get a really odd error when binding to
both a combox and a datetimepicker.

I bind like the following:

//// tDs is the strongly typed dataset,
//// tDs.TheTask returns a strongly typed row from one of the tables.
/// GetBindingTaskT ypes() returns the types I want to use as a datasource in
an arraylist.

dtPicker.DataBi ndings.Add("Val ue", tDs.TheTask, "TaskStart" );

cBox.DisplayMem ber = "TypeName";
cBox.ValueMembe r = "TypeID";
cBox.DataSource = tDs.GetBindingT askTypes();
cBox.DataBindin gs.Add("Selecte dValue", tDs.TheTask, "TaskType") ;

The problem occurs when presented with the user interface, once the value in
the cBox is changed and the focus is moved elsewhere the cBox steals the
focus back! Now usually it just steals it back once.
However it refuses to move focus to any control on a different groupbox or
tabpage and then proceeds to hang so that you cant even close the form down.

Does anybody know anything about this kind of behaviour?

Kind Regards
Jax
Nov 17 '05 #1
0 2007

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

Similar topics

2
3862
by: Richard | last post by:
Hi, I have a DateTime picker control on a form. The datetime picker control is data bound to a column in a DataTable. Yes I know about bound DateTime pickers and DBNull and etc. so no troubles with that stuff... However, as somebody out there probably knows, programmatically setting the DateTimePicker.Value property to a new VALUE does NOT in itself constitute a CHANGE to
15
3675
by: Tim Jarvis | last post by:
Hi, I have an object that I am binding to a text box, this object exposes a boolean field, and I have implemented a format event handler and a parse event handler for the binding object, where I convert the bool value to some meaningful text. i.e. Binding b = new
2
1909
by: Johann Blake | last post by:
I've been playing around trying to bind textbox controls and datagrids to typed datasets. Up until recently, I never used DataBindings. I always manually wrote the value into a textbox and stored its value after the textbox lost focus or whenever someone manually saved the record. I came to the conclusion after a long time and after many apps have been developed that there had to be a better way. What I thought would have been great is...
6
6732
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!
7
2727
by: Justin Hoffman | last post by:
I am new to vb.net programming and am just exploring the way databinding works with Windows forms and am having trouble with some fairly basic customization of data entry. The form uses the SqlDataAdapter and SqlDataset and loads a very simple table, with both text and integer fields. If a textbox is bound to an integer source where the current value is a valid integer, say 9, I can type in the textbox 'rubbish' and move to another...
0
1291
by: Simon Gregory | last post by:
I am currently attempting to figure out how the new databinding stucture works in ASP.NET 2.0 after working with v1.0 & v1.1 for several years. It seems that if you wish to do set up databinding at Design Time, you are restricted to using one of the 5 xxxDataSource controls. The data in our websites are usually obtained via a set of webservices and are contained in a set of strongly typed relational DataSets.
11
1801
by: =?Utf-8?B?R29rdWw=?= | last post by:
I am struck up with a problem and want anyone here to help me out. I am a beginner in .NET trying to learng DataBinding concepts. I have binded 4 text boxes with a dataset but when I say adapter.update it gives me 0 records updated! I am not getting any exceptions. Below is the complete code. Someone please help me out. using System; using System.Drawing; using System.Collections; using System.ComponentModel;
7
2592
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 happen until user click update button.
2
2216
by: dvestal | last post by:
The example below creates a ComboBox, and binds its Text field to the Text field of a textbox. When the user types into the textbox, the corresponding ComboBox value is selected. What is the best way to know at runtime whether the user has typed a value that isn't in the ComboBox's list of valid values? I need a solution that works using the built-in binding events, rather than using manual checking of the value when it changes. I'd...
0
8392
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8819
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8597
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
7428
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6222
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5692
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4222
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4403
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2809
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.