i have an combobox and datagrid when user select a data from combobox the grid will be populated according to that using MVVM and entity framework
Advance thanks
i have an combobox and datagrid when user select a data from combobox the grid will be populated according to that using MVVM and entity framework
Advance thanks
In your ViewModel, create a SelectedItem property which notifies on change as so:
private object _selectedItem
public object SelectedItem
{
get
{
return _selectedItem;
}
set
{
_selectedItem = value;
OnPropertyChanged("SelectedItem")
}
}
Bind your SelectedItem property of your combo box to this property.
Then watch for a change on SelectedItem and change your datagrid's source property accordingly.