Exemple #1
0
        protected override void PrepareControlHierarchy()
        {
            RenderHelper.GetStatusBarStyle().AssignToControl(this, true);
            Width = Unit.Percentage(100.0);
            TemplateContainer.Width = Unit.Percentage(100.0);
            RenderHelper.AppendGridCssClassName(MainRow);

            PrepareSearchResultSummaryControl();

            base.PrepareControlHierarchy();
        }
        protected override void PrepareControlHierarchy()
        {
            #region IMPLEMENTATION OF GridViewTableCommandCell.PrepareControlHierarchy

            #region IMPLEMENTATION OF GridViewTableBaseCommandCell.PrepareControlHierarchy

            RenderHelper.GetCommandColumnStyle(Column).AssignToControl(this, true);

            var commandColumnItemStyle = RenderHelper.GetCommandColumnItemStyle(Column);
            commandColumnItemStyle.CssClass = RenderUtils.CombineCssClasses(commandColumnItemStyle.CssClass, "dxgv__cci");

            ControlsContainer.Controls.Evict(x => x is GridViewCommandColumnSpacer)
            .Select(control =>
            {
                if (control is GridViewCommandColumnButtonControl)
                {
                    return(((GridViewCommandColumnButtonControl)control)._Control());
                }

                return(control);
            }
                    )
            .Each(actualControl =>
            {
                commandColumnItemStyle.AssignToControl(actualControl, true);
            }
                  );


            RenderHelper.AppendGridCssClassName(this);

            Grid.RaiseHtmlCommandCellPrepared_Internal(this);

            #region IMPLEMENTATION OF GridViewTableCellEx.PrepareControlHierarchy

            if (GetRemoveLeftBorder())
            {
                RenderUtils.SetStyleUnitAttribute(this, "border-left-width", 0);
            }

            if (GetRemoveRightBorder())
            {
                RenderUtils.SetStyleUnitAttribute(this, "border-right-width", 0);
            }

            if (RemoveBottomBorder)
            {
                RenderUtils.SetStyleUnitAttribute(this, "border-bottom-width", 0);
            }

            if (HorizontalAlign == HorizontalAlign.NotSet && RenderHelper.IsRightToLeft && RenderHelper.RequireFixedTableLayout)
            {
                HorizontalAlign = HorizontalAlign.Right;
            }

            #endregion

            RenderHelper.SetCellWidthIfRequired(Column, this, VisibleIndex);

            #endregion

            HorizontalAlign = HorizontalAlign.Center;

            #endregion

            if (Autosize)
            {
                Width = RenderHelper.GetNarrowCellWidth();
            }
        }