/// <summary>
/// Binds the grids.
/// </summary>
private void BindGrids()
{
using ( var rockContext = new RockContext() )
{
BlockService blockService = new BlockService( rockContext );
gLayoutBlocks.DataSource = blockService.GetByLayoutAndZone( _Page.LayoutId, _ZoneName )
.Select( b => new
{
b.Id,
b.Name,
BlockTypeName = b.BlockType.Name,
BlockTypePath = b.BlockType.Path
} )
.ToList();
gLayoutBlocks.DataBind();
gPageBlocks.DataSource = blockService.GetByPageAndZone( _Page.Id, _ZoneName )
.Select( b => new
{
b.Id,
b.Name,
BlockTypeName = b.BlockType.Name,
BlockTypePath = b.BlockType.Path
} )
.ToList();
gPageBlocks.DataBind();
}
}