Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tabpagecontrol, binding, from refresh misery
Message
 
To
01/11/2011 12:24:39
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
OS:
Vista
Network:
Windows XP
Database:
Jet/Access Engine
Application:
Desktop
Miscellaneous
Thread ID:
01527103
Message ID:
01527823
Views:
39
Dear Bonnie,

What you explain seems to be what you would expect, but somehow it does not seem to work in this way.

What does help (I think, because I have not tested this fully yet), is to call this
       For i As Integer = 1 To Me.TpgBase1.TabPages.Count
            Me.TpgBase1.SelectTab(i - 1)
       Next
in the load event of the form.

Could it be that the binding logic needs somehow to be activated?

I expect (hope?) that I can "baseclass" this and forget about it.

Kind regards,

Marc


>Hey Marc,
>
>Can I ask why you want to refresh your TabPages like this? If you've databound the controls on your TabPages, there's no reason to have to refresh them. The data will be in your controls simply because they've been databound and you should be accessing the data directly, not the controls values.
>
>IOW, say I have a TextBox on tabPage2, and I've called it txtOnTabPage2. And I databind it like this:
>
>
txtOnTabPage2.DataBindings.Add("Text", MyDataTable, "MyColumn")
>
>When I go to save the data, I'll be saving what's in MyDataTable, not what's in txtOnTabPage2.Text. Is this not what you're doing?
>
>~~Bonnie
>
>
>
>
>
>>I have a form with a tabpagecontol on it. In order to have all the fields on the different pages refreshed I found out I have to do something like
>>
>>Now that gets me some ugly mickey mousing on my form, so I'm looking for a way to "freeze" the screen while I do that, but suspendlayout, resumelayout do not have any effect. Here's the full code.
>>
>>
>>       Me.BestelHCRUD.Fill(Me.BestelDS.BestH, Me.obzBestel.pk)
>>        Me.SuspendLayout()
>>        For i As Integer = 1 To Me.TpgBase1.TabPages.Count
>>            Me.TpgBase1.SelectTab(i - 1)
>>        Next
>>        Me.TpgBase1.SelectTab(0)
>>        Me.ResumeLayout()
>>
>>
>>Thanks and kind regards,
>>
>>Marc

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform