March 31, 2006

Provided Views

Writing about web page

I've been doing more work on the BindingListView project.

A problem I faced was when displaying a master-details style UI. I could make the master list a BindingListView (with filtering, sorting, etc) but then the child "details" list would just be whatever the business object had defined it as e.g. List.
While the business object developer could add an additional property that exposed a BindingListView of a list, that violates the separation of business logic and UI logic. (Since a view is really only for the UI's benefit.)

The solution was to make the view object provide additional properties at runtime using its ITypedList interface implementation. Basically, it looks for properties that implement generic IList and then returns additional properties for a BindingListView of those. The actual view objects are stored in the EditableObject wrappers of source items.

So I can now set the DataMember of a child bindingsource on my form to something like "OrderView". This is the provided view of the "Orders" list.

- No comments Not publicly viewable

Add a comment

You are not allowed to comment on this entry as it has restricted commenting permissions.

Google Ads

Search this blog

Most recent comments

  • I scratched my eye while i was holding some kind of plastic packaging.. Anyways the corner of the pl… by Ercan on this entry
  • About a year ago my contacts that i was wearing, i guess were fautly, because shortly after they wer… by Jon on this entry
  • I got shower gel in my eye 4 and a half days ago, and becasue i rubbed my eyes a lot, i have scratch… by Chris on this entry
  • This website may help–health/tc/Eye–Injuries–Home–Treatment by S on this entry
  • I somehow got dirt, or debris in my eye. The terrible pain sent me in a tailspin. I was afraid of sa… by Bobbi on this entry


March 2006

Mo Tu We Th Fr Sa Su
Feb |  Today  | Apr
      1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31      


Blog archive

Not signed in
Sign in

Powered by BlogBuilder