Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vfp .net event equivalent
Message
 
À
20/11/2010 19:53:51
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 8.0
OS:
Vista
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01489449
Message ID:
01489995
Vues:
25
>>In a "if you can't beat it, join it" spirit, I updated the bindingsource just before the (ta).update at the form level.
>
>Hmmm ... not sure what you mean, but did this fix your problem? (And don't get me started on the topic of using TableAdapters on Forms. That is just wrong, IMHO!)

Well it did fix the ad hoc problem, but I was hoping the handle this in the baseclass whereas now I have to worry about it at the form level and the code ain't pretty :) :
        Me.BindingSource1(0)("Art_Snijden") = IIf(Me.ARt_SnijdenCtl.Text = "Ja", True, False)
        Me.BindingSource1(0)("Art_Korting") = IIf(Me.Art_KortingCtl.Text = "Ja", True, False)
        Me.BindingSource1(0)("Art_Uitzonderlijk") = IIf(Me.art_Uitzonderlijkctl.Text = "Ja", True, False)
        Me.BindingSource1(0)("Art_VerwittigenGewicht") = IIf(Me.Art_VerwittigenGewichtCtl.Text = "Ja", True, False)
        Me.BindingSource1(0)("Art_Perpersoon") = IIf(Me.Art_PerpersoonCtl.Text = "Ja", True, False)
btw when I issue these statements? the parse event is fired, you would expect the reverse no? I'm probably missing something major here.

>
>>I must have misunderstood what that parse event was. I thought that if format fires when the underlying data gets communicated to the control, that parse would do the reverse....
>
>And it does do that, you did not misunderstand. But, my point is that it does not happen until the control's Validated event fires, which will not happen if the control never loses focus ... unless you force it to happen.
>
>>Anyway, looking forward to your posting :).
>
>I'm in the process of writing it as we speak (hope I finish it before dinner-time, or it may have to wait until tomorrow).
>
>~~Bonnie
>
>>
>>
>>>>... the binding.parse event does not seem to fire. I was hoping that when bindingsource would .endedit, the parse event would trigger, but it does not, in fact, curiously enough I get the feeling that the format event is triggered instead and the original value of the field is saved.
>>>
>>>More likely what is happening is that you're clicking on a MenuItem or ToolBar button ...these controls do not cause the ActiveControl to lose focus, thus not forcing the control's value into it's databound object, which is when the Parse event fires. You need something that will force this for every control you have (it's the Validated event that accomplishes this). It can get complicated.
>>>
>>>I have a method that I have named ForceBind() in most of my controls (those that have it implement an Interface I have created for this type of behavior). If the control is a container object that implements that Interface (such as a Panel, UserControl, etc.) it will call the ForceBind() method of *it's* ActiveControl (if *that* control implements the Interface).
>>>
>>>Hmmm ... maybe I should put all this, along with some code, in a blog post. I need to post something to my blog this month, so maybe this will be it. I'm not sure if this is your problem, Marc, but it certainly could be. Let me write something up for my blog and I'll post the link here once it's done.
>>>
>>>~~Bonnie

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform