By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,786 Members | 1,143 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,786 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.
/// GetBindingTaskTypes() returns the types I want to use as a datasource in
an arraylist.

dtPicker.DataBindings.Add("Value", tDs.TheTask, "TaskStart");

cBox.DisplayMember = "TypeName";
cBox.ValueMember = "TypeID";
cBox.DataSource = tDs.GetBindingTaskTypes();
cBox.DataBindings.Add("SelectedValue", 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
Nov 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.