468,168 Members | 1,653 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,168 developers. It's quick & easy.

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.
/// 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
Jax
Nov 17 '05 #1
0 1782

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Richard | last post: by
15 posts views Thread by Tim Jarvis | last post: by
2 posts views Thread by Johann Blake | last post: by
6 posts views Thread by eye5600 | last post: by
7 posts views Thread by Justin Hoffman | last post: by
reply views Thread by Simon Gregory | last post: by
11 posts views Thread by =?Utf-8?B?R29rdWw=?= | last post: by
7 posts views Thread by Vlado Jasovic | last post: by
2 posts views Thread by dvestal | last post: by
1 post views Thread by gcdp | last post: by
reply views Thread by kamranasdasdas | last post: by
reply views Thread by gcreed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.