Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Databinding refresh
Message
 
To
01/12/2004 17:40:29
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00966178
Message ID:
00966237
Views:
9
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();
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform