Ejemplo n.º 1
0
        private void RGrid_GridReorder( object sender, GridReorderEventArgs e )
        {
            var rockContext = new RockContext();
            var attributeService = new AttributeService( rockContext );
            var qry = GetData( rockContext );
            var updatedAttributeIds = attributeService.Reorder( qry.ToList(), e.OldIndex, e.NewIndex );

            rockContext.SaveChanges();

            foreach ( int id in updatedAttributeIds )
            {
                AttributeCache.Flush( id );
            }
            AttributeCache.FlushEntityAttributes();

            BindGrid();
        }