You have strange logic, and if statement is ended with comma.
if (((CheckBox)dataItem.FindControl("CheckBox2")).Enabled != false) ;
As the result, they become two separate lines.
{
((CheckBox)dataItem.FindControl("CheckBox2")).Checked = true;
}
Solution
foreach (GridDataItem dataItem in RadGrid1.MasterTableView.Items)
{
var checkbox = dataItem.FindControl("CheckBox2") as CheckBox;
if (checkbox.Enabled)
{
checkbox.Checked = true;
}
}