Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scoping
Message
 
 
À
15/09/2003 23:22:26
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
00829033
Message ID:
00829530
Vues:
21
>Web control on windows control? I think binddata does it for web controls, not sure are windows controls, maybe resetbinding?

Hi Bob.

I'm working with Windows controls, and the ResetBindings method seems to (in effect) do the same thing as Control.DataBindings.Clear(), as it resets the DataBindings to their default value (presumably clearing the collection).

Again, I think there is some confusion w/regard to the term "binding". Much of what I've read refers to both populating a list control and setting it's "control source" as "binding". Considering that my testing shows that when you specify a DataSource, the list control isn't actually "bound" to it (hence the ability to allow the object specified as the DataSoruce to go out of scope), but rather the contents of the object specified as the DataSource are transferred to the list control's Items collection property.

I asked this question in response to this observation. In VFP (and yes, I know that you know this <s>) we can specify an array as the RowSource of a list control, change the contents of the array, then call the list object's Requery() method to re-load the list control's List collection property. Because a .NET list control doesn't seem to maintain the "connection" with (in my test case) the ArrayList as the VFP list controls do with their RowSource, I'm guessing that there is no native method to "re-read" the DataSource - I'll have to change the ArrayList, set the DataSource to null, then re-specify the DataSource, DisplayMember and ValueMember, all of which seems to work fine. I'd probably create a RePopulateItems() method to do this in a subclass of the list controls if I felt the need...
>>-Steve->>

Steve Sawyer
Geeks and Gurus, Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform