private void CtrGridAward_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) { var headerName = ctrGridAward.Columns[e.ColumnIndex].DataPropertyName; if (headerName == "AwardName") { if (sortOrder == SortOrder.Asc) { sortOrder = SortOrder.Desc; listOfAwards.SortAwardsByNameAsc(); } else { sortOrder = SortOrder.Asc; listOfAwards.SortAwardsByNameDesc(); } } DisplayAwards(); }