[RESOLVED] [2.0] questions about currencyManger/bindingSource
howdy!
Recently I was enlightened to the bindingSource class. I was doing some reading and some testing and I have a couple of questions.
by creating a bindingSource it automatically creates a CurrencyManager right? I am pretty sure about that fact however from what I can infer about what a CurrencyManager does wouldn't a dataGridVIew need to create one of these by default?
Also - If I create a bindingSource, set the dataSource and then set the datagridview datasource to the bindingSource, they somehow must share the same CurrencyManager, right?
Like this
vb Code:
bs = new BindingSource();
bs.DataSource = ds.Tables[0];
dgSearchResults.DataSource = bs;
Also - I have done some reading on this subject but some of it was a little fuzzy - anyone have a good suggestion for further reading?
Thanks
Re: [2.0] questions about currencyManger/bindingSource
Before the BindingSource you would bind a list directly to a control and then you'd have to access the CurrencyManager directly to manipulate the data through the binding. It was a pain. The BindingSource is basically just a wrapper for that CurrencyManager, providing a consistent, user-friendly interface to manipulating the data through the binding. You should be able to almost all of what you need as far as bound data manipulation via the BindingSource, without ever having to touch any controls, data sources or CurrencyManagers directly.