Nicholas,
I don't think the only alternative to something like CurrencyManager is that
the data source would manage its position. It has always seemed more
intuitive to me that the *control* would be responsible for knowing its
position in its data source, not the data source itself. Then if two
controls use the same data source, no problem, because each one knows its
own position within that common data source.
The CurrencyManager therefore isn't strictly needed to provide position, it
could be done in other reasonable ways, such as controls implementing an
ICurrency interface for instance. I'm not saying CurrencyManager is bad,
but I haven't had my "aha experience" yet about why that approach is the
*best* way. Sometimes it strikes me as taking decoupling a little too far.
Just a little over-engineered, maybe. Certainly, a lot of developers I have
talked to about it, myself included, find it rather arcane at times,
especially when you're learning it. Possibly even if BindingManagerBase /
CurrencyManager is needed for some use cases, a simpler wrapper could be put
around it for everyday use.
--Bob
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:Ov*************@TK2MSFTNGP15.phx.gbl...
Bill,
The currency manager is used to determine what the current record in a
context is. The reason for this is that you might have one data source
bound to one grid, and the same data source attached to another grid. If
the data source (table) was responsible for the row position, then both
grids would show the the current row as being the same. With different
currency managers attached to different contexts, you don't have to worry
about this.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"web1110" <we***@comcast.net> wrote in message
news:Tp********************@comcast.com...I created a class derived from a DataGridTextBoxColumn.
I have it working through looking at various examples on the net.
To update the underlying DataGrid, I had to overload the Edit method
which
provided the CurrencyManager and row number required for SetColumnAtRow
method.
My question is, exactly is the CurrencyManager? I've used it, but I
don't
understand it.
Thanx,
Bill