/// <summary> /// Handles the GridReorder event of the gConnectionOpportunities control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="GridReorderEventArgs" /> instance containing the event data.</param> protected void gConnectionOpportunities_GridReorder(object sender, GridReorderEventArgs e) { var rockContext = new RockContext(); var service = new ConnectionOpportunityService(rockContext); var connectionOpportunities = service.Queryable().OrderBy(b => b.Order); service.Reorder(connectionOpportunities.ToList(), e.OldIndex, e.NewIndex); rockContext.SaveChanges(); BindConnectionOpportunitiesGrid(); }