J
John Yung
Hi,
My program binds several controls on a WinForm to a Data Table via CurrencyManager.
Example:
txtComment.DataBindings.Add("Text", _currentDS.WithholdingTax, "Comment");
txtComment.DataBindings[0].Parse += new ConvertEventHandler(frmMain_Parse);
....
_cmCurrentRecord = (CurrencyManager)this.BindingContext[_currentDS.WithholdingTax];
The data in Data Table is retrieve via a remote call to a business object. After the data is retrieve, I call the Refresh method on the currency manager.
Before I move to .NET 2.0, the values on the form would be refresh. However, since I moved to .NET 2.0, the values no longer refresh on the screen.
After I did some debugging, I noticed the Position value of the currency manager is always at -1. So before I call the Refresh method on the currency manager, I manually set the position value to 0 (the first record on the datatable, and I vertified the record exist on the datatable). That did not help, the position value is still equals to 0.
Anyone know why this happens?
Thanks,
John Yung
My program binds several controls on a WinForm to a Data Table via CurrencyManager.
Example:
txtComment.DataBindings.Add("Text", _currentDS.WithholdingTax, "Comment");
txtComment.DataBindings[0].Parse += new ConvertEventHandler(frmMain_Parse);
....
_cmCurrentRecord = (CurrencyManager)this.BindingContext[_currentDS.WithholdingTax];
The data in Data Table is retrieve via a remote call to a business object. After the data is retrieve, I call the Refresh method on the currency manager.
Before I move to .NET 2.0, the values on the form would be refresh. However, since I moved to .NET 2.0, the values no longer refresh on the screen.
After I did some debugging, I noticed the Position value of the currency manager is always at -1. So before I call the Refresh method on the currency manager, I manually set the position value to 0 (the first record on the datatable, and I vertified the record exist on the datatable). That did not help, the position value is still equals to 0.
Anyone know why this happens?
Thanks,
John Yung