<StackPanel> <ListBox Width="400" Name="lstFiles" ItemsSource="{Binding}"> <ListBox.ItemTemplate> <DataTemplate> <Grid Name="dataGrid"> <Grid.RowDefinitions> <RowDefinition/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition/> <ColumnDefinition/> <ColumnDefinition/> </Grid.ColumnDefinitions> <TextBox Name="dragFileName" Margin="5,0,0,0" Text="{Binding fileName, UpdateSourceTrigger=Default}" /> <ComboBox Grid.Row="0" Grid.Column="1" Margin="5,0,0,0" Name="cboDragDocType" ItemsSource="{Binding dragDocType, UpdateSourceTrigger=LostFocus, Mode=TwoWay}" Text="{Binding dragDocTypeText}" IsEditable="True" IsReadOnly="True" /> <Button Name="dragDelBtn" Grid.Column="2" Height="20">X</Button> </Grid> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </StackPanel>
Data is loading in comboBox by using ObservableCollection property. In Initialize method i do for loop method to get multiple items. Problem scenario: Select item from the dropdown1 --> then Select item from the dropdown2 -->Again click dropdown1, Now dropdown1 itemssource is empty.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)