Posted 14 years ago
by jack kenyon

Hi,
I have a combo box linked to a ObjectDataSource with ObservableCollection<>.
I want the property box to work with the current object that is selected by the combo box.
I have the following setup.
<ObjectDataProvider
x:Key="dbListResources"
ObjectType="{x:Type bizobj:DataServerCollection}"
MethodName="GetCollection">
</ObjectDataProvider>
.....
<Grid
DataContext="{Binding Source={StaticResource dbListResources}}">
.......
<ComboBox
Name="comboBox1"
ItemsSource="{Binding}"
IsSynchronizedWithCurrentItem="true"
SelectedValuePath="Shortcut"
ItemTemplate="{DynamicResource dbListLayout}">
</ComboBox>
.......
<propgrid:PropertyGrid
Margin="21,96,21,27"
Name="propertyGrid1"
CollectionDisplayMode="Expandable"
IsItemsSourceAutoUpdated="True"
SelectedObjects="{Binding}">
</propgrid:PropertyGrid>
....
</Grid>
The combo box works as expected, but the property editor shows the correct property names, but the data seems unvarying and incorrect.
Can you show me what I am doing wrong please?
I have a combo box linked to a ObjectDataSource with ObservableCollection<>.
I want the property box to work with the current object that is selected by the combo box.
I have the following setup.
<ObjectDataProvider
x:Key="dbListResources"
ObjectType="{x:Type bizobj:DataServerCollection}"
MethodName="GetCollection">
</ObjectDataProvider>
.....
<Grid
DataContext="{Binding Source={StaticResource dbListResources}}">
.......
<ComboBox
Name="comboBox1"
ItemsSource="{Binding}"
IsSynchronizedWithCurrentItem="true"
SelectedValuePath="Shortcut"
ItemTemplate="{DynamicResource dbListLayout}">
</ComboBox>
.......
<propgrid:PropertyGrid
Margin="21,96,21,27"
Name="propertyGrid1"
CollectionDisplayMode="Expandable"
IsItemsSourceAutoUpdated="True"
SelectedObjects="{Binding}">
</propgrid:PropertyGrid>
....
</Grid>
The combo box works as expected, but the property editor shows the correct property names, but the data seems unvarying and incorrect.
Can you show me what I am doing wrong please?