예제 #1
0
        /// <summary>
        ///     Initializes a new instance of the
        ///     <see cref="MvcGridBuilder{T1}" /> class.
        /// </summary>
        /// <param name="gridDefaults">The grid defaults.</param>
        /// <param name="columnDefaults">The column defaults.</param>
        /// TODO Edit XML Comment Template for #ctor
        public MvcGridBuilder(
            GridDefaults gridDefaults,
            ColumnDefaults columnDefaults)
        {
            GridDefinition = new GridDefinition <T1>(gridDefaults);

            _columnDefaults = columnDefaults;
        }
        /// <summary>
        ///     Initializes a new instance of the
        ///     <see cref="GridDefinition{T1}" /> class.
        /// </summary>
        /// <param name="gridDefaults">The grid defaults.</param>
        /// TODO Edit XML Comment Template for #ctor
        public GridDefinition(GridDefaults gridDefaults)
        {
            Columns = new List <GridColumn <T1> >();

            if (gridDefaults == null)
            {
                gridDefaults = new GridDefaults();
            }
            PreloadData           = gridDefaults.PreloadData;
            QueryOnPageLoad       = gridDefaults.QueryOnPageLoad;
            Paging                = gridDefaults.Paging;
            ItemsPerPage          = gridDefaults.ItemsPerPage;
            Sorting               = gridDefaults.Sorting;
            DefaultSortColumn     = gridDefaults.DefaultSortColumn;
            NoResultsMessage      = gridDefaults.NoResultsMessage;
            NextButtonCaption     = gridDefaults.NextButtonCaption;
            PreviousButtonCaption = gridDefaults.PreviousButtonCaption;
            SummaryMessage        = gridDefaults.SummaryMessage;
            ProcessingMessage     = gridDefaults.ProcessingMessage;
            ClientSideLoadingMessageFunctionName = gridDefaults
                                                   .ClientSideLoadingMessageFunctionName;
            ClientSideLoadingCompleteFunctionName = gridDefaults
                                                    .ClientSideLoadingCompleteFunctionName;
            Filtering = gridDefaults.Filtering;
            //this.RenderingEngine = gridDefaults.RenderingEngine;
            TemplatingEngine           = gridDefaults.TemplatingEngine;
            AdditionalSettings         = gridDefaults.AdditionalSettings;
            RenderingMode              = gridDefaults.RenderingMode;
            ViewPath                   = gridDefaults.ViewPath;
            ContainerViewPath          = gridDefaults.ContainerViewPath;
            QueryStringPrefix          = gridDefaults.QueryStringPrefix;
            ErrorMessageHtml           = gridDefaults.ErrorMessageHtml;
            AdditionalQueryOptionNames =
                gridDefaults.AdditionalQueryOptionNames;
            PageParameterNames    = gridDefaults.PageParameterNames;
            AllowChangingPageSize = gridDefaults.AllowChangingPageSize;
            MaxItemsPerPage       = gridDefaults.MaxItemsPerPage;
            AuthorizationType     = gridDefaults.AuthorizationType;

            RenderingEngines           = gridDefaults.RenderingEngines;
            DefaultRenderingEngineName =
                gridDefaults.DefaultRenderingEngineName;
        }
예제 #3
0
 /// <summary>
 ///     Initializes a new instance of the
 ///     <see cref="MvcGridBuilder{T1}" /> class.
 /// </summary>
 /// <param name="gridDefaults">The grid defaults.</param>
 /// TODO Edit XML Comment Template for #ctor
 public MvcGridBuilder(GridDefaults gridDefaults)
     : this(gridDefaults, null)
 {
 }