I have a GridView that I'm binding to a custom collection of custom objects. In this GridView, I need to bind a ComboBoxColumn to a set of values in a different collection.
For example,
I've created a VB.NET List(of String) that holds the names of states. My class that the grid is bound to has a State property. I want to bind the states column to that List(of String) collection so that the user sees the dropdown of all available options when editing the particular record.
My List(Of String) is defined in a Module, and thus accessible as a global variable in the app. The custom class comes from a different library, and doesn't know anything about the list of states.
I can't seem to get the ItemsSource of the ComboBoxColumn to bind to something defined in a Module. Is such a scenario allowed?
For example,
I've created a VB.NET List(of String) that holds the names of states. My class that the grid is bound to has a State property. I want to bind the states column to that List(of String) collection so that the user sees the dropdown of all available options when editing the particular record.
My List(Of String) is defined in a Module, and thus accessible as a global variable in the app. The custom class comes from a different library, and doesn't know anything about the list of states.
I can't seem to get the ItemsSource of the ComboBoxColumn to bind to something defined in a Module. Is such a scenario allowed?