The View ConfigRole has 2 columns, Name and IsEnabled(checkBox)with Button Edit for every row,
ConfigRole:
** If CheckBox is TRUE for a Row in ConfigRole View,when I click on Edit Button I get new View Button_Lists which has 2 columns Name_Button and IsEnabled(CheckBox)...and I modify TRUe or FALSe for every IsEnabled.
**My objectif is : When IsEnabled ConfigRole is FALSE, I want to get all the IsEnabled Button_Lists default to FALSE,
ButtonList:
this is my try code in Button_Lists Model:
// get all of ButtonsList
public ObservableCollection<ButtonRoleMapClass> ButtonList
{
get { return _buttonList; }
set
{
_buttonList = value;
OnPropertyChanged("ButtonList");
}
}
//viewRoleButton: the Name of selected row in ConfigRole
public ButtonListViewModel(ViewRoleMapClass viewRoleButton)
{
//If IsEnabled for row in ConfigRole is FALSE
if (viewRoleButton.IsEnabled==false)
{
ObservableCollection<ButtonRoleMapClass> butsList = new ObservableCollection<ButtonRoleMapClass>();
foreach (ButtonRoleMapClass button in _buttonList)
{
button.IsEnabled = false;
butsList.Add(button);
}
_buttonList = butsList;
}
I want to get all CheckBox in Datagrid for View Button_Lists default is FALSE,
But with my code, I have this Error:
How can I fix it?

