I have a datagrid and a view model that has an Observable collection of \"Person\" class which serves as ItemSource for the datagrid.
The Datagrid has two text colum
Bind a property to CanUserDeleteRows.
XAML:
CanUserDeleteRows="{Binding UserCanDelete}"
ViewModel:
public bool UserCanDelete
{
get
{
// return a value based on the currently selected item and business rules
}
}
Make sure you're raising a PropertyChanged event for this property somewhere, where you do that would depend on the other data changes that affect your return value.