Adf.Web.UI.SmartView.BaseField.InitializeCell C# (CSharp) Method

InitializeCell() public method

Add text or controls to a cell's control collection.
public InitializeCell ( DataControlFieldCell cell, DataControlCellType cellType, DataControlRowState rowState, int rowIndex ) : void
cell DataControlFieldCell
cellType DataControlCellType
rowState DataControlRowState
rowIndex int The index of the row that the is contained in.
return void
        public override void InitializeCell(DataControlFieldCell cell, DataControlCellType cellType, DataControlRowState rowState, int rowIndex)
        {
            base.InitializeCell(cell, cellType, rowState, rowIndex);

            if (ColumnStyle != null)
            {
                if (HeaderStyle.CssClass.IsNullOrEmpty()) HeaderStyle.CssClass = ColumnStyle;
                if (ItemStyle.CssClass.IsNullOrEmpty()) ItemStyle.CssClass = ColumnStyle;
                if (FooterStyle.CssClass.IsNullOrEmpty()) FooterStyle.CssClass = ColumnStyle;
            }
            if (Width != null)
            {
                ItemStyle.Width = Unit.Parse(Width);
            }
            if (cellType == DataControlCellType.DataCell)
            {
                //ItemTemplate =
                if (!_tooltip.IsNullOrEmpty()) cell.ToolTip = _tooltip;
            }
        }