views:

478

answers:

1

And this was supposed to be so easy...

I have existing business and data access layers that handle the retrieval and update of the data in question. These work great with the existing Winforms application (.Net V2.0)

Now, in trying to write a new web-based UI, I'm running into all sorts of problems (last time I wrote asp.net code was in 1.1). Specifically, I can't data bind a text box to a business object. Oh, sure there's the ObjectDataSource but that wants to know how to do CRUD operations on the data.

What I'm looking for is something that acts like the 'classic' binding objects so that, in my code, it's as simple as retrieving the object and doing a a refresh. The data component like FormView and DetailsView are so generic-looking that it's ridiculous. The existing application would have tabbed dialogs, text boxes grouped by panels, etc.

On top of that, I have a directive to use master pages and unless one control causes it, I can't seem to get the content section to expand. I can't just put a text box 'below' the bottom of "Content1" and have it resize the content section - which gives me the same results as an earlier question I posted when the footer wasn't being 'pushed down' - relative position solved that but doesn't seem to solve it with placing small text boxes in the area.

What I want is fairly simple. Something like:

bindingobject.datasource = businessdataobject
bindingobject.refresh

...and have the text boxes refresh with the new values. Likewise to have 'businessdataobject' properties updated as the user enters new data.

I was able to do this with the GridView (grdRequests.DataSource = lstRequests) by making a list of asp:BoundField tags inside the collection of the GridView.

Am I tilting at windmills here?

A: 

Hi,

Why don't you give the Patterns and Practices (1) ObjectContainerDataSource a try? It's part of the Web Client Software Factory which is available (2) here.

I've used it a few times, it gives you the ODS-style design experience (design time binding) but full control over how you provide the data source. You just implement the events you are interested in (e.g. Selecting event). It also has server side paging and sorting support so it's quite useful for GridViews.

It might not be flexible enough for what you aretrying to achieve, but it's probably worth checking out if only as a PoC.

[ (1) http://www.codeplex.com/websf/Wiki/View.aspx?title=Object%20Container%20DataSource ] [ (2) http://www.codeplex.com/websf ]

RobS
I'll have to check it out when I get more time to work on this project. Thanks.
David