>Here's a weird problem:
>I hope I can explain it clearly.
>
>I have a Win Form with a tab control with 5 pages
>All controls on all pages are bound to one SQL Server table with a lot of columns.
>All seems well with the data handling. All columns are updated properly, and appear properly on the tab pages when the record is selected -
>
>EXCEPT:
>
>If I select a tab page with a checkbox on it, when I exit the paget. I have to exit the form in order to select another record and see the data on the form.
>
>If I select a tab page without a checkbox and exit the page I can select another record and see the data on the form without having to leave the form.
>It seems that exiting a page containing a checkbox is messing up the bindings. In the bebugger, the binding seems to be gone.
>
>I validated this by moving a checkbox on and off a page and got failure and success.
>
>I thought something might be wrong with a particular checkbox so I tried it with several and got the same results.
>
>All the data for the checkboxes shows perfectly and updates perfectly.
>
>
>Here's how I set the bindings
>
> public void SetBindings()
> {
>
> foreach (Control c in tabControlCustomer.Controls)
> {
> foreach (Control d in c.Controls)
> {
> if (d is TextBox)
> {
> int length = d.Name.ToString().Length;
> string columnname = d.Name.ToString().Substring(7, length - 7);
> d.DataBindings.Add(new Binding("Text", customerAccess.ds, "arcust." + columnname));
> continue;
> }
> if (d is CheckBox)
> {
> int length = d.Name.ToString().Length;
> string columnname = d.Name.ToString().Substring(8, length - 8);
> d.DataBindings.Add(new Binding("Checked", customerAccess.ds, "arcust." + columnname));
> continue;
> }
> }
> }
> }
>
>
>Any clues??????????????????
I have gotten odd behavior with check boxes when I want to react to a change in the checked status but I have several tab pages that have check boxes and haven't seen this behavior. I am using the Mere Mortals Framework, so that may change things a bit. Do you have any code in any of the check box methods?
Linda Harmes
HiBit Technologies, Inc.