According to MSDN InvalidOperationException is thrown when
The object specified by the DataSource property does not implement the IBindingList interface.
dgvList.DataSource = _db.UserProfiles.OrderBy(r => r.Family).ToList();
-or-
The object specified by the DataSource property has a IBindingList.SupportsSorting property value of False.
var list =_db.UserProfiles.OrderBy(r => r.Family).ToList();
var bs = new BindingSource();
bs.DataSource = list;
dgvList.DataSource = bs;
you can look at a possible solution on StackOverflow
http://stackoverflow.com/questions/4702014/sorting-datagridview-datasource-on-listt-where-t-is-anonymous[
^]