谁能帮我看看为什么即使条件只满足一次,这段代码也会禁用所有行?
private void RollListGrid_RowLoaded(object sender, RowLoadedEventArgs e)
{
if (masterList[0].Rolls[0].IsActive = false)
e.Row.IsEnabled = false;
foreach (var roll in masterList.Where(s => s.StudentId == StudentID))
{
foreach (var v in roll.MasterEnrolmentStatusList.Values)
{
if (v != null)
EnrolmentStatus.Add(v.Value.ToString());
}
}
foreach (var status in EnrolmentStatus)
{
if (status == "Confirmed")
e.Row.IsEnabled = false;
}
}