Jeff,

> I noticed that Microsoft went through a lot of trouble adding data binding
> to windows forms, even to the point where we can drag and drop connections
> and data sets right on to a form. The data grid control _only_ supports

data
> binding. What I don't understand is why? In 3-tier or n-tier architecture,
> only presentation related code goes into the ui. Business rules should

never
> be in the ui, let alone data access code. Doesn't this go against

everything
> they've been telling us about architecture design? What am I missing?


It is just that isolated samples rarely give you a sufficiently robust
picture.

DataBindings can be to anything. You need a mechanism to cross the
boundaries in your three tiered application. I find a derived dataset to be
the best tool for this, but it certainly isn't the only one.

You neatly box your data access into classes in one tier. This produces
data, perhaps a derived dataset and updates data. Your middle tier contains
business logic, and can easily contain data rules that might otherwise drift
toward the UI. This is because validation can (and in my opinion should)
take place in data table events, rather than UI events (at least for
WinForms). You can then bind to the data and still retain control over its
access.

That is rather superficial. Is it enough to get you started?

Hints:
If you like drag drop, etc. Add a "Component" to your data layer and drag
drop there. Just be aware that everything you drop gets instantiated with
the component.

Strongly typed datasets are great, imo. They give you design time support.
That is what I further derive

The "DataSet" option in the Data toolbox for your form allows you a quick
way to add a strongly typed data set to your form. This then allows design
time binding

Design time databinding of a base form and visual inheritance do not mix.
You will have to set yoru base form databindings in code.

There are some quirks to databinding. It does work, and I'd suggest asking
for help quickly when it seems to not be working.

Kathleen

"Jeff Pipes" <JeffP622@msn.com> wrote in message
news:3cc8281c$1@10.1.10.29...
>
> I noticed that Microsoft went through a lot of trouble adding data binding
> to windows forms, even to the point where we can drag and drop connections
> and data sets right on to a form. The data grid control _only_ supports

data
> binding. What I don't understand is why? In 3-tier or n-tier architecture,
> only presentation related code goes into the ui. Business rules should

never
> be in the ui, let alone data access code. Doesn't this go against

everything
> they've been telling us about architecture design? What am I missing?
>
> -Jeff