Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Exposing a type safe collection for data binding

Exposing a type safe collection for data binding

Scheduled Pinned Locked Moved Visual Basic
wpfwcfcomquestion
3 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Duncan Edwards Jones
    wrote on last edited by
    #1

    I have a usercontrol and one of it's members is a type safe collection (inherited from CollectionBase.DictionaryBase). Now I want this collection to be bindable (read-only) to a datagrid. I have added the attribute Bindable(True) to the property and implemented IListSource in the control and returned this list from GetList() overloaded function but it doesn't show up in the datagrid's bindings. What step(s) am I missing? Thanks in advance, Duncan '--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd

    D 2 Replies Last reply
    0
    • D Duncan Edwards Jones

      I have a usercontrol and one of it's members is a type safe collection (inherited from CollectionBase.DictionaryBase). Now I want this collection to be bindable (read-only) to a datagrid. I have added the attribute Bindable(True) to the property and implemented IListSource in the control and returned this list from GetList() overloaded function but it doesn't show up in the datagrid's bindings. What step(s) am I missing? Thanks in advance, Duncan '--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd

      D Offline
      D Offline
      Duncan Edwards Jones
      wrote on last edited by
      #2

      It trurns out I should have implemented IBindableList not IListSource. Now the datagrid lists my control as a source in the DataBindings but it doesn't show any columns - I take it it doesn't know what the type safe collection type looks like? How do I add property descriptions to my existing class so the data bound grid can pick them up? '--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd

      1 Reply Last reply
      0
      • D Duncan Edwards Jones

        I have a usercontrol and one of it's members is a type safe collection (inherited from CollectionBase.DictionaryBase). Now I want this collection to be bindable (read-only) to a datagrid. I have added the attribute Bindable(True) to the property and implemented IListSource in the control and returned this list from GetList() overloaded function but it doesn't show up in the datagrid's bindings. What step(s) am I missing? Thanks in advance, Duncan '--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd

        D Offline
        D Offline
        Duncan Edwards Jones
        wrote on last edited by
        #3

        It turns out I should have implemented IBindableList not IListSource. Now the datagrid lists my control as a source in the DataBindings but it doesn't show any columns - I take it it doesn't know what the type safe collection type looks like? How do I add property descriptions to my existing class so the data bound grid can pick them up? '--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups