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

I will use the second, but i'll make it generic (in a base class) so i can change it anytime someone else jump-n and say differently.

Tanks again for your help.

Are you the only person here, or you like me and always make sure you're the first to answer my posts.... Very appreciated !!

>I dunno ... the second one, simply resetting the bindings every time, sure looks cleaner. Easier to read, so therefore more maintainable. But, I maybe would've structured my Query stuff differently (passing the DataSet to it, which would be passed by reference, instead of returning it).
>
>I just haven't had to deal with this issue, so I'm just spinning my wheels here. You know what? It sure would help if someone else who's used remoting and has maybe done this before would jump into this discussion. For now, I'd say just go with the second method.
>
>~~Bonnie
>
>
>
>
>>It works now!!
>>
>>I added this line:
>>
>>
>>_cust.Clear();
>>
>>
>>but i'm not sure which is best, load an xml in the dataset or replace the existing dataset and redo the bindings. It comes up tho the same result but what is more effective ?
>>
>>
>>AR_CustMaster cust = new AR_CustMaster(3, 0, false);
>>QueryResult res = cust.Query(custNo);
>>if (_cust !=null)
>>{
>>	_cust.Clear();
>>	StringBuilder sb = new StringBuilder();
>>	System.IO.StringWriter sw = new StringWriter(sb);
>>	res.queryResult.WriteXml(sw);
>>	StringReader sr = new StringReader(sb.ToString());
>>	_cust.ReadXml(sr, XmlReadMode.InferSchema);
>>	_cust.AcceptChanges();
>>}
>>else
>>{
>>	_cust = res.queryResult as AR_CustMaster;
>>	this.SetBindings();
>>}
>>
>>
>>-- OR --
>>
>>
>>AR_CustMaster cust = new AR_CustMaster(3, 0, false);
>>QueryResult res = cust.Query(custNo);
>>_cust = res.queryResult as AR_CustMaster;
>>this.SetBindings();
>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform