/// <summary>
 /// Renders the end tag to the crop span element if a begin tag has been rendered.
 /// </summary>
 /// <param name="renderingContext">The <see cref="BocColumnRenderingContext{BocColumnDefinition}"/>.</param>
 /// <param name="enforceWidth">Specifies if a corresponding begin tag has been rendered.</param>
 private void RenderCropSpanEndTag(BocColumnRenderingContext <TBocColumnDefinition> renderingContext, bool enforceWidth)
 {
     if (enforceWidth)
     {
         renderingContext.Writer.RenderEndTag();
     }
 }
        private void RenderEditedRowCellContents(
            BocColumnRenderingContext <BocRowEditModeColumnDefinition> renderingContext,
            int originalRowIndex,
            IBusinessObject businessObject)
        {
            RenderCommandControl(
                renderingContext,
                originalRowIndex,
                businessObject,
                BocList.RowEditModeCommand.Save,
                BocList.ResourceIdentifier.RowEditModeSaveAlternateText,
                renderingContext.ColumnDefinition.SaveIcon,
                renderingContext.ColumnDefinition.SaveText);

            renderingContext.Writer.Write(" ");

            RenderCommandControl(
                renderingContext,
                originalRowIndex,
                businessObject,
                BocList.RowEditModeCommand.Cancel,
                BocList.ResourceIdentifier.RowEditModeCancelAlternateText,
                renderingContext.ColumnDefinition.CancelIcon,
                renderingContext.ColumnDefinition.CancelText);
        }
Exemple #3
0
        private void RenderCustomCellInnerControls(BocColumnRenderingContext <BocCustomColumnDefinition> renderingContext, int originalRowIndex, int rowIndex)
        {
            BocListCustomColumnTuple[] customColumnTuples = renderingContext.Control.CustomColumns[renderingContext.ColumnDefinition];
            BocListCustomColumnTuple   customColumnTuple;

            if (customColumnTuples.Length > rowIndex && customColumnTuples[rowIndex].Item2 == originalRowIndex)
            {
                customColumnTuple = customColumnTuples[rowIndex];
            }
            else
            {
                customColumnTuple = customColumnTuples.FirstOrDefault(t => t.Item2 == originalRowIndex);
            }

            if (customColumnTuple == null)
            {
                renderingContext.Writer.Write(c_whiteSpace);
                return;
            }

            RenderClickWrapperBeginTag(renderingContext);

            Control control = customColumnTuple.Item3;

            if (control != null)
            {
                ApplyStyleDefaults(control);
                control.RenderControl(renderingContext.Writer);
            }

            RenderClickWrapperEndTag(renderingContext);
        }
 public void RenderDataCell(
     BocColumnRenderingContext renderingContext,
     int rowIndex,
     bool showIcon,
     BocListDataRowRenderEventArgs dataRowRenderEventArgs)
 {
 }
        /// <summary>
        /// Renders the cell contents depending on the <paramref name="dataRowRenderEventArgs"/>'s
        /// <see cref="BocListDataRowRenderEventArgs.IsEditableRow"/> property.
        /// <seealso cref="BocColumnRendererBase{TBocColumnDefinition}.RenderCellContents"/>
        /// </summary>
        /// <remarks>
        /// If the current row is being edited, "Save" and "Cancel" controls are rendered; if the row can be edited, an "Edit" control is rendered;
        /// if the row cannot be edited, an empty cell is rendered.
        /// Since the "Save", "Cancel" and "Edit" controls are structurally identical, their actual rendering is done by <see cref="RenderCommandControl"/>
        /// </remarks>
        protected override void RenderCellContents(
            BocColumnRenderingContext <BocRowEditModeColumnDefinition> renderingContext,
            BocListDataRowRenderEventArgs dataRowRenderEventArgs,
            int rowIndex,
            bool showIcon)
        {
            ArgumentUtility.CheckNotNull("renderingContext", renderingContext);
            ArgumentUtility.CheckNotNull("dataRowRenderEventArgs", dataRowRenderEventArgs);

            int  originalRowIndex = dataRowRenderEventArgs.ListIndex;
            var  businessObject   = dataRowRenderEventArgs.BusinessObject;
            bool isEditableRow    = dataRowRenderEventArgs.IsEditableRow;
            bool isEditedRow      = renderingContext.Control.EditModeController.GetEditableRow(originalRowIndex) != null;

            if (isEditedRow)
            {
                RenderEditedRowCellContents(renderingContext, originalRowIndex, businessObject);
            }
            else if (isEditableRow)
            {
                RenderEditableRowCellContents(renderingContext, originalRowIndex, businessObject);
            }
            else
            {
                renderingContext.Writer.Write(c_whiteSpace);
            }
        }
Exemple #6
0
        /// <summary>
        /// Renders a <see cref="DropDownMenu"/> with the options for the current row.
        /// <seealso cref="BocColumnRendererBase{TBocColumnDefinition}.RenderCellContents"/>
        /// </summary>
        /// <remarks>
        /// The menu title is generated from the <see cref="DropDownMenu.TitleText"/> and <see cref="DropDownMenu.TitleText"/> properties of
        /// the column definition in <see cref="BocColumnRenderingContext.ColumnDefinition"/>, and populated with the menu items in
        /// the <see cref="IBocList.RowMenus"/> property.
        /// </remarks>
        protected override void RenderCellContents(
            BocColumnRenderingContext <BocDropDownMenuColumnDefinition> renderingContext,
            BocListDataRowRenderEventArgs dataRowRenderEventArgs,
            int rowIndex,
            bool showIcon)
        {
            ArgumentUtility.CheckNotNull("renderingContext", renderingContext);
            ArgumentUtility.CheckNotNull("dataRowRenderEventArgs", dataRowRenderEventArgs);

            if (renderingContext.Control.RowMenus.Count <= rowIndex)
            {
                renderingContext.Writer.Write(c_whiteSpace);
                return;
            }

            var dropDownMenu = renderingContext.Control.RowMenus[rowIndex];

            if (renderingContext.Control.HasClientScript)
            {
                renderingContext.Writer.AddAttribute(HtmlTextWriterAttribute.Onclick, c_onCommandClickScript);
            }
            renderingContext.Writer.RenderBeginTag(HtmlTextWriterTag.Div); // Begin div

            dropDownMenu.Enabled = !renderingContext.Control.EditModeController.IsRowEditModeActive;

            dropDownMenu.TitleText = renderingContext.ColumnDefinition.MenuTitleText;
            dropDownMenu.TitleIcon = renderingContext.ColumnDefinition.MenuTitleIcon;
            dropDownMenu.RenderControl(renderingContext.Writer);

            renderingContext.Writer.RenderEndTag(); // End div
        }
        private void RenderBeginTagTitleCellSortCommand(BocColumnRenderingContext <TBocColumnDefinition> renderingContext)
        {
            bool hasSortingCommand = renderingContext.Control.IsClientSideSortingEnabled
                                     &&
                                     (renderingContext.ColumnDefinition is IBocSortableColumnDefinition &&
                                      ((IBocSortableColumnDefinition)renderingContext.ColumnDefinition).IsSortable);

            if (hasSortingCommand)
            {
                if (!renderingContext.Control.EditModeController.IsRowEditModeActive && !renderingContext.Control.EditModeController.IsListEditModeActive &&
                    renderingContext.Control.HasClientScript)
                {
                    var sortCommandID = renderingContext.Control.ClientID + "_" + renderingContext.ColumnIndex + "_SortCommand";
                    renderingContext.Writer.AddAttribute(HtmlTextWriterAttribute.Id, sortCommandID);

                    string argument      = BocList.SortCommandPrefix + renderingContext.ColumnIndex;
                    string postBackEvent = renderingContext.Control.Page.ClientScript.GetPostBackEventReference(renderingContext.Control, argument);
                    postBackEvent += "; return false;";
                    renderingContext.Writer.AddAttribute(HtmlTextWriterAttribute.Onclick, postBackEvent);

                    renderingContext.Writer.AddAttribute(HtmlTextWriterAttribute.Href, "#");

                    renderingContext.Writer.RenderBeginTag(HtmlTextWriterTag.A);
                }
                else
                {
                    renderingContext.Writer.RenderBeginTag(HtmlTextWriterTag.Span);
                }
            }
            else
            {
                renderingContext.Writer.RenderBeginTag(HtmlTextWriterTag.Span);
            }
        }
 private void RenderTitleCellMarkers(BocColumnRenderingContext <TBocColumnDefinition> renderingContext)
 {
     renderingContext.Control.EditModeController.RenderTitleCellMarkers(
         renderingContext.Writer,
         renderingContext.ColumnDefinition,
         renderingContext.ColumnIndex);
 }
 protected virtual void RenderDataColumnDeclaration(BocColumnRenderingContext <TBocColumnDefinition> renderingContext, bool isTextXml)
 {
     renderingContext.Writer.WriteBeginTag("col");
     if (!renderingContext.ColumnDefinition.Width.IsEmpty)
     {
         renderingContext.Writer.Write(" style=\"");
         string width;
         var    columnAsValueColumn = renderingContext.ColumnDefinition as BocValueColumnDefinition;
         if (columnAsValueColumn != null && columnAsValueColumn.EnforceWidth && renderingContext.ColumnDefinition.Width.Type != UnitType.Percentage)
         {
             width = "2em";
         }
         else
         {
             width = renderingContext.ColumnDefinition.Width.ToString();
         }
         renderingContext.Writer.WriteStyleAttribute("width", width);
         renderingContext.Writer.Write("\"");
     }
     if (isTextXml)
     {
         renderingContext.Writer.Write(" />");
     }
     else
     {
         renderingContext.Writer.Write(">");
     }
 }
Exemple #10
0
        private void RenderClickWrapperBeginTag(BocColumnRenderingContext <BocCustomColumnDefinition> renderingContext)
        {
            string onClick = renderingContext.Control.HasClientScript ? c_onCommandClickScript : string.Empty;

            renderingContext.Writer.AddAttribute(HtmlTextWriterAttribute.Onclick, onClick);
            renderingContext.Writer.RenderBeginTag(HtmlTextWriterTag.Span);
        }
 void IBocColumnRenderer.RenderTitleCell(BocColumnRenderingContext renderingContext, SortingDirection sortingDirection, int orderIndex)
 {
     RenderTitleCell(
         new BocColumnRenderingContext <TBocColumnDefinition> (renderingContext),
         sortingDirection,
         orderIndex);
 }
        /// <summary>
        /// Renders a table cell for <see cref="BocColumnRenderingContext.ColumnDefinition"/> containing the appropriate data from the
        /// <see cref="IBusinessObject"/> contained in <paramref name="dataRowRenderEventArgs"/>
        /// </summary>
        /// <param name="renderingContext">The <see cref="BocColumnRenderingContext{BocColumnDefinition}"/>.</param>
        /// <param name="rowIndex">The zero-based index of the row on the page to be displayed.</param>
        /// <param name="showIcon">Specifies if an object-specific icon will be rendered in the table cell.</param>
        /// <param name="dataRowRenderEventArgs">Specifies row-specific arguments used in rendering the table cell.</param>
        /// <remarks>
        /// This is a template method. Deriving classes must implement <see cref="RenderCellContents"/> to provide the contents of
        /// the table cell (&lt;td&gt;) element.
        /// </remarks>
        protected virtual void RenderDataCell(
            BocColumnRenderingContext <TBocColumnDefinition> renderingContext,
            int rowIndex,
            bool showIcon,
            BocListDataRowRenderEventArgs dataRowRenderEventArgs)
        {
            ArgumentUtility.CheckNotNull("renderingContext", renderingContext);
            ArgumentUtility.CheckNotNull("dataRowRenderEventArgs", dataRowRenderEventArgs);

            string cssClassTableCell = CssClasses.DataCell;

            if (!string.IsNullOrEmpty(renderingContext.ColumnDefinition.CssClass))
            {
                cssClassTableCell += " " + renderingContext.ColumnDefinition.CssClass;
            }
            renderingContext.Writer.AddAttribute(HtmlTextWriterAttribute.Class, cssClassTableCell);
            if (_renderingFeatures.EnableDiagnosticMetadata)
            {
                AddDiagnosticMetadataAttributes(renderingContext);
            }
            renderingContext.Writer.RenderBeginTag(HtmlTextWriterTag.Td);

            RenderCellContents(renderingContext, dataRowRenderEventArgs, rowIndex, showIcon);

            renderingContext.Writer.RenderEndTag();
        }
Exemple #13
0
        /// <summary>
        /// Renders a string representation of the property of <paramref name="businessObject"/> that is shown in the column.
        /// </summary>
        /// <param name="renderingContext">The <see cref="BocColumnRenderingContext{BocColumnDefinition}"/>.</param>
        /// <param name="businessObject">The <see cref="IBusinessObject"/> whose property will be rendered.</param>
        /// <param name="editableRow">Ignored.</param>
        protected override void RenderCellDataForEditMode(
            BocColumnRenderingContext <BocCompoundColumnDefinition> renderingContext, IBusinessObject businessObject, IEditableRow editableRow)
        {
            ArgumentUtility.CheckNotNull("renderingContext", renderingContext);
            ArgumentUtility.CheckNotNull("businessObject", businessObject);

            RenderValueColumnCellText(renderingContext, renderingContext.ColumnDefinition.GetStringValue(businessObject));
        }
 private void RenderCellIcon(
     BocColumnRenderingContext <BocCommandColumnDefinition> renderingContext, IBusinessObject businessObject, bool hasEditModeControl, bool showIcon)
 {
     if (!hasEditModeControl && showIcon)
     {
         RenderCellIcon(renderingContext, businessObject);
     }
 }
        /// <summary>
        /// Renders the edit mode control.
        /// </summary>
        /// <param name="renderingContext">The <see cref="BocColumnRenderingContext{BocColumnDefinition}"/>.</param>
        /// <param name="businessObject">The <see cref="IBusinessObject"/> whose property will be rendered.</param>
        /// <param name="editableRow">The <see cref="EditableRow"/> object used to actually render the edit row controls.</param>
        protected override void RenderCellDataForEditMode(
            BocColumnRenderingContext <BocSimpleColumnDefinition> renderingContext, IBusinessObject businessObject, IEditableRow editableRow)
        {
            ArgumentUtility.CheckNotNull("renderingContext", renderingContext);
            ArgumentUtility.CheckNotNull("businessObject", businessObject);
            ArgumentUtility.CheckNotNull("editableRow", editableRow);

            RenderEditModeControl(renderingContext, businessObject, editableRow);
        }
 protected void RenderEndTag(BocColumnRenderingContext <BocCommandColumnDefinition> renderingContext, bool isCommandEnabled)
 {
     if (isCommandEnabled)
     {
         RenderEndTagDataCellCommand(renderingContext);
     }
     else
     {
         renderingContext.Writer.RenderEndTag();
     }
 }
        private void RenderCellCommand(BocColumnRenderingContext <BocCommandColumnDefinition> renderingContext)
        {
            if (renderingContext.ColumnDefinition.Icon.HasRenderingInformation)
            {
                renderingContext.ColumnDefinition.Icon.Render(renderingContext.Writer, renderingContext.Control);
            }

            if (!string.IsNullOrEmpty(renderingContext.ColumnDefinition.Text))
            {
                renderingContext.Writer.Write(renderingContext.ColumnDefinition.Text); // Do not HTML encode
            }
        }
 private void RenderTitleCellText(BocColumnRenderingContext <TBocColumnDefinition> renderingContext)
 {
     if (renderingContext.Control.IsDesignMode && string.IsNullOrEmpty(renderingContext.ColumnDefinition.ColumnTitleDisplayValue))
     {
         renderingContext.Writer.Write(c_designModeEmptyContents);
     }
     else
     {
         string contents = StringUtility.EmptyToNull(renderingContext.ColumnDefinition.ColumnTitleDisplayValue) ?? c_whiteSpace;
         renderingContext.Writer.Write(contents);
     }
 }
        private bool RenderBeginTag(
            BocColumnRenderingContext <BocCommandColumnDefinition> renderingContext, int originalRowIndex, IBusinessObject businessObject)
        {
            bool isCommandEnabled = RenderBeginTagDataCellCommand(renderingContext, businessObject, originalRowIndex);

            if (!isCommandEnabled)
            {
                renderingContext.Writer.AddAttribute(HtmlTextWriterAttribute.Class, CssClasses.Content);
                renderingContext.Writer.RenderBeginTag(HtmlTextWriterTag.Span);
            }
            return(isCommandEnabled);
        }
 void IBocColumnRenderer.RenderDataCell(
     BocColumnRenderingContext renderingContext,
     int rowIndex,
     bool showIcon,
     BocListDataRowRenderEventArgs dataRowRenderEventArgs)
 {
     RenderDataCell(
         new BocColumnRenderingContext <TBocColumnDefinition> (renderingContext),
         rowIndex,
         showIcon,
         dataRowRenderEventArgs);
 }
        protected void RenderCellIcon(BocColumnRenderingContext <TBocColumnDefinition> renderingContext, IBusinessObject businessObject)
        {
            ArgumentUtility.CheckNotNull("renderingContext", renderingContext);
            ArgumentUtility.CheckNotNull("businessObject", businessObject);

            IconInfo icon = BusinessObjectBoundWebControl.GetIcon(businessObject, businessObject.BusinessObjectClass.BusinessObjectProvider);

            if (icon != null)
            {
                icon.Render(renderingContext.Writer, renderingContext.Control);
                renderingContext.Writer.Write(c_whiteSpace);
            }
        }
        public void RenderTitleCell(BocRenderingContext <IBocList> renderingContext)
        {
            ArgumentUtility.CheckNotNull("renderingContext", renderingContext);

            var columnRenderingContext = new BocColumnRenderingContext(
                renderingContext.HttpContext,
                renderingContext.Writer,
                renderingContext.Control,
                ColumnDefinition,
                ColumnIndex,
                VisibleColumnIndex);

            _columnRenderer.RenderTitleCell(columnRenderingContext, _sortingDirection, _orderIndex);
        }
 private void RenderEditableRowCellContents(
     BocColumnRenderingContext <BocRowEditModeColumnDefinition> renderingContext,
     int originalRowIndex,
     IBusinessObject businessObject)
 {
     RenderCommandControl(
         renderingContext,
         originalRowIndex,
         businessObject,
         BocList.RowEditModeCommand.Edit,
         BocList.ResourceIdentifier.RowEditModeEditAlternateText,
         renderingContext.ColumnDefinition.EditIcon,
         renderingContext.ColumnDefinition.EditText);
 }
        public void RenderDataColumnDeclaration(BocRenderingContext <IBocList> renderingContext, bool isTextXml)
        {
            ArgumentUtility.CheckNotNull("renderingContext", renderingContext);

            var columnRenderingContext = new BocColumnRenderingContext(
                renderingContext.HttpContext,
                renderingContext.Writer,
                renderingContext.Control,
                ColumnDefinition,
                ColumnIndex,
                VisibleColumnIndex);

            _columnRenderer.RenderDataColumnDeclaration(columnRenderingContext, isTextXml);
        }
Exemple #25
0
        private void RenderCustomCellDirectly(
            BocColumnRenderingContext <BocCustomColumnDefinition> renderingContext, IBusinessObject businessObject, int originalRowIndex)
        {
            string onClick = renderingContext.Control.HasClientScript ? c_onCommandClickScript : string.Empty;
            BocCustomCellRenderArguments arguments = new BocCustomCellRenderArguments(
                renderingContext.Control,
                businessObject,
                renderingContext.ColumnDefinition,
                renderingContext.ColumnIndex,
                originalRowIndex,
                onClick);

            renderingContext.ColumnDefinition.CustomCell.RenderInternal(renderingContext.Writer, arguments);
        }
        public void RenderDataCell(BocRenderingContext <IBocList> renderingContext, int rowIndex, BocListDataRowRenderEventArgs dataRowRenderEventArgs)
        {
            ArgumentUtility.CheckNotNull("renderingContext", renderingContext);
            ArgumentUtility.CheckNotNull("dataRowRenderEventArgs", dataRowRenderEventArgs);

            var columnRenderingContext = new BocColumnRenderingContext(
                renderingContext.HttpContext,
                renderingContext.Writer,
                renderingContext.Control,
                ColumnDefinition,
                ColumnIndex,
                VisibleColumnIndex);

            _columnRenderer.RenderDataCell(columnRenderingContext, rowIndex, _showIcon, dataRowRenderEventArgs);
        }
        /// <summary>
        /// Renders a table cell for a <see cref="BocValueColumnDefinition"/>.
        /// </summary>
        protected override void RenderCellContents(
            BocColumnRenderingContext <TBocColumnDefinition> renderingContext,
            BocListDataRowRenderEventArgs dataRowRenderEventArgs,
            int rowIndex,
            bool showIcon)
        {
            ArgumentUtility.CheckNotNull("renderingContext", renderingContext);
            ArgumentUtility.CheckNotNull("dataRowRenderEventArgs", dataRowRenderEventArgs);

            int             originalRowIndex = dataRowRenderEventArgs.ListIndex;
            IBusinessObject businessObject   = dataRowRenderEventArgs.BusinessObject;

            IEditableRow editableRow = renderingContext.Control.EditModeController.GetEditableRow(originalRowIndex);

            bool hasEditModeControl  = editableRow != null && editableRow.HasEditControl(renderingContext.ColumnIndex);
            bool showEditModeControl = hasEditModeControl && !editableRow.GetEditControl(renderingContext.ColumnIndex).IsReadOnly;

            string valueColumnText = null;

            if (!showEditModeControl)
            {
                valueColumnText = renderingContext.ColumnDefinition.GetStringValue(businessObject);
            }

            bool enforceWidth     = RenderCropSpanBeginTag(renderingContext, showEditModeControl, valueColumnText);
            bool isCommandEnabled = RenderBeginTag(renderingContext, originalRowIndex, businessObject, valueColumnText);

            if (!hasEditModeControl)
            {
                if (showIcon)
                {
                    RenderCellIcon(renderingContext, businessObject);
                }

                RenderOtherIcons(renderingContext, businessObject);
            }
            if (showEditModeControl)
            {
                RenderCellDataForEditMode(renderingContext, businessObject, editableRow);
            }
            else
            {
                RenderValueColumnCellText(renderingContext, valueColumnText);
            }

            RenderEndTag(renderingContext, isCommandEnabled);
            RenderCropSpanEndTag(renderingContext, enforceWidth);
        }
        protected virtual void RenderTitleCell(
            BocColumnRenderingContext <TBocColumnDefinition> renderingContext,
            SortingDirection sortingDirection,
            int orderIndex)
        {
            ArgumentUtility.CheckNotNull("renderingContext", renderingContext);

            string cssClassTitleCell = CssClasses.TitleCell;

            if (!string.IsNullOrEmpty(renderingContext.ColumnDefinition.CssClass))
            {
                cssClassTitleCell += " " + renderingContext.ColumnDefinition.CssClass;
            }
            renderingContext.Writer.AddAttribute(HtmlTextWriterAttribute.Class, cssClassTitleCell);
            if (_renderingFeatures.EnableDiagnosticMetadata)
            {
                var columnItemID = renderingContext.ColumnDefinition.ItemID;
                if (!string.IsNullOrEmpty(columnItemID))
                {
                    renderingContext.Writer.AddAttribute(DiagnosticMetadataAttributes.ItemID, columnItemID);
                }

                var columnTitle = renderingContext.ColumnDefinition.ColumnTitleDisplayValue;
                if (!string.IsNullOrEmpty(columnTitle))
                {
                    renderingContext.Writer.AddAttribute(DiagnosticMetadataAttributes.Content, HtmlUtility.StripHtmlTags(columnTitle));
                }

                var oneBasedCellIndex = renderingContext.VisibleColumnIndex + 1;
                renderingContext.Writer.AddAttribute(DiagnosticMetadataAttributesForObjectBinding.BocListCellIndex, oneBasedCellIndex.ToString());

                renderingContext.Writer.AddAttribute(
                    DiagnosticMetadataAttributesForObjectBinding.BocListColumnHasDiagnosticMetadata,
                    HasDiagnoticMetadata.ToString().ToLower());
            }
            renderingContext.Writer.RenderBeginTag(HtmlTextWriterTag.Th);

            RenderTitleCellMarkers(renderingContext);
            RenderBeginTagTitleCellSortCommand(renderingContext);
            RenderTitleCellText(renderingContext);
            if (renderingContext.Control.IsClientSideSortingEnabled || renderingContext.Control.HasSortingKeys)
            {
                RenderTitleCellSortingButton(renderingContext, sortingDirection, orderIndex);
            }
            RenderEndTagTitleCellSortCommand(renderingContext);

            renderingContext.Writer.RenderEndTag();
        }
 public BocColumnRenderingContext(
     BocColumnRenderingContext renderingContext)
     : base(
         renderingContext.HttpContext,
         renderingContext.Writer,
         renderingContext.Control,
         renderingContext.ColumnDefinition,
         renderingContext.ColumnIndex,
         renderingContext.VisibleColumnIndex)
 {
     if (!(renderingContext.ColumnDefinition is TBocColumnDefinition))
     {
         throw ArgumentUtility.CreateArgumentTypeException(
                   "renderingContext.ColumnDefinition", renderingContext.ColumnDefinition.GetType(), typeof(TBocColumnDefinition));
     }
 }
        private void RenderEditModeControl(
            BocColumnRenderingContext <BocSimpleColumnDefinition> renderingContext, IBusinessObject businessObject, IEditableRow editableRow)
        {
            if (renderingContext.Control.HasClientScript)
            {
                renderingContext.Writer.AddAttribute(HtmlTextWriterAttribute.Onclick, c_onCommandClickScript);
            }
            renderingContext.Writer.RenderBeginTag(HtmlTextWriterTag.Span); // Begin span

            editableRow.RenderSimpleColumnCellEditModeControl(
                renderingContext.Writer,
                renderingContext.ColumnDefinition,
                businessObject,
                renderingContext.ColumnIndex);

            renderingContext.Writer.RenderEndTag(); // End span
        }