/// <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{TBocColumnDefinition}"/>.</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 (<td>) element. /// </remarks> public virtual void RenderDataCell( BocColumnRenderingContext <TBocColumnDefinition> renderingContext, int rowIndex, bool showIcon, BocListDataRowRenderEventArgs dataRowRenderEventArgs) { ArgumentUtility.CheckNotNull("renderingContext", renderingContext); ArgumentUtility.CheckNotNull("dataRowRenderEventArgs", dataRowRenderEventArgs); string cssClassTableCell = CssClasses.GetDataCell(dataRowRenderEventArgs.IsOddRow); if (!string.IsNullOrEmpty(renderingContext.ColumnDefinition.CssClass)) { cssClassTableCell += " " + renderingContext.ColumnDefinition.CssClass; } renderingContext.Writer.AddAttribute(HtmlTextWriterAttribute.Class, cssClassTableCell); renderingContext.Writer.RenderBeginTag(HtmlTextWriterTag.Td); RenderCellContents(renderingContext, dataRowRenderEventArgs, rowIndex, showIcon); renderingContext.Writer.RenderEndTag(); }