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

InitializeCell() public method

public InitializeCell ( System.Web.UI.WebControls.DataControlFieldCell cell, DataControlCellType cellType, DataControlRowState rowState, int rowIndex ) : void
cell System.Web.UI.WebControls.DataControlFieldCell
cellType DataControlCellType
rowState DataControlRowState
rowIndex int
return void
        public override void InitializeCell(DataControlFieldCell cell, DataControlCellType cellType, DataControlRowState rowState, int rowIndex)
        {
            base.InitializeCell(cell, cellType, rowState, rowIndex);

            switch (cellType)
            {
                case DataControlCellType.Header:
                    HeaderStyle.Set(HeadStyle).Set(FieldStyle);
                break;
                case DataControlCellType.Footer:
                    FooterStyle.Set(FootStyle).Set(FieldStyle);
                break;
                default:
                    ItemStyle.Set(FieldStyle);

                    if (Width != null) ItemStyle.Width = Unit.Parse(Width);

                    InitializeControls(cell, cellType, rowState, rowIndex);

                    if (cellType == DataControlCellType.DataCell) cell.DataBinding += ItemDataBinding;
                break;
            }
        }