470,624 Members | 2,538 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Databinding and re-loading a Dataset

I have a problem with re-loading datasets.

As a simple example, if I have an SQL table of addresses
comprising active and inactive addresss, I wish to load either
sub-set by clicking on a checkBox. The data is Bound to various
on a Windows Form.

This works fine, I can load either set of data into the same
dataset and datatable, but the problem comes when navigating
the records using the BindingContext. When I switch from
active addresses to inactive addresses, then click on a navigator
I get the following error message:

'DataBinding cannot find a row in the list that is suitable for all

I clear the dataset table before re-loading the data.
I have tried clearing and re-setting the Bindings on the controls
between loads
I have tried SuspendBinding() and ResumeBinding() between loads
I have re-set the Position of the BindingContext for the dataset/
I have tried re-setting the Position via a Currency Manager
I have Disposed and re-created the dataset

None of these work, I get the same error message

I am not doing any updating, editing or deleting on the data.

The only other thing of note is that when I first open the Winform
for active addresses the initial BindingContext Postion is 0

When I click on the checkBox to get the inactive addresses the
initial BindingContext Postion is 5 (ie total of 6 records, but why is
the Position not 0?)

thanks in advance for any comments

Chris Divine

Apr 17 '07 #1
0 1872

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Victor Jones | last post: by
reply views Thread by Victor Jones | last post: by
reply views Thread by Wayne Sepega | last post: by
1 post views Thread by Zak Lomakus | last post: by
1 post views Thread by =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post: by
4 posts views Thread by Jason Wolf | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.