This solution i experienced. when i develop wpf application there i used combobox. when i try to add new student that time combobox items not reloaded. because of application loading time i loaded dynamically. so i don't no how to refresh the combobox list. After that i got this solution. when u add new item while after "objwindow.ShowDialog()" refresh the combobox.
<ComboBox Name="Student" ItemsSource="{Binding Source={StaticResource Students}, XPath=Student/@StudentName}" SelectionChanged="{pti:DelegateCreator student_Changed}" MinWidth="150" Style="{StaticResource RequiredComboBox}" />
ComboBox _studentList = FindLogicalNode(window, STUDENT_LIST) as ComboBox;
private static void studentConfig_Click(object source, RoutedEventArgs args) { StudentConfiguration objwindow = new StudentConfiguration(); objwindow.ShowDialog(); (_studentList.FindResource("Students") as XmlDataProvider).Refresh(); }
0 comments
Post a Comment