New Posts New Posts RSS Feed: ListConverter for DataTable
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

ListConverter for DataTable

 Post Reply Post Reply
Author
vecs View Drop Down
Newbie
Newbie


Joined: 05-Dec-2007
Location: Russian Federation
Posts: 22
Post Options Post Options   Quote vecs Quote  Post ReplyReply Direct Link To This Post Topic: ListConverter for DataTable
    Posted: 16-Jul-2008 at 1:43am
In my example I have an EditorView for Product entity with ComboBox control binded to Product.SupplierId property. Also I have DataTable contained data on suppliers having "Id" and "Name" fields.
I`d like to screw this suppliers table up to ComboBox dropdown list so "Id" and "Name" field values be treated as ValueMember and DisplayMember (surely I use ControlBindingManager for binding).
Suppliers table have no corresponding Supplier entity type in my module because this table is coming as additional dictionary from 3rd party source..

Is it possible to use DataTable as source of values for ComboBox control? How should I setup ListConverter for corresponding BindingDescriptor?

Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 16-Jul-2008 at 4:02pm
Look at the Advanced Tutorial on "Binding to Non-Persistable Objects".  The real problem is not than we can't bind to non-persistable objects.  That is easy enough to do.  The real problem is that we can't save the changes.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down