Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Databinding refresh
Message
 
À
01/12/2004 17:06:48
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00966178
Message ID:
00966218
Vues:
7
Thanks Bonnie,

How would i refresh the existing DataSet with the tables contained in the new dataset i received from my new query ?

>I'm pretty sure that the problem lies with the fact that you are probably recreating the DataTable every time. If instead the existing DataTable could be cleared with _cust.AR_CustMaster.Clear() and then filled (all in your server method probably) then your data bindings would not get lost.
>
>~~Bonnie
>
>
>
>>It's a typed dataset, received from a server method (via remoting)
>>
>>>Hi Stephane,
>>>
>>>How are you refreshing your data? Is _cust.AR_CustMaster a table?
>>>
>>>~~Bonnie
>>>
>>>
>>>
>>>>I a form i have a dataset and i bind a field to a text box:
>>>>
>>>>
>>>>this.textBox1.DataBindings.Add("Text", _cust.AR_CustMaster, "Name");
>>>>
>>>>
>>>>this works fine but if i refresh the dataset with some new data the binding does not refresh. but if i execute this code after the dataset refresh:
>>>>
>>>>this.textBox1.DataBindings.Clear();
>>>>this.textBox1.DataBindings.Add("Text", _cust.AR_CustMaster, "Name");
>>>>
>>>>
>>>>The new binding works fine.
>>>>
>>>>My question is: is this the way to do (recreating all bindings after a data refresh) or there's some kind of magic method i haven't found yet ?
>>>>
>>>>Thanks
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform