Adf.Web.UI.SmartView.LinkColumn.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);

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

            if (cellType == DataControlCellType.DataCell)
            {

                var button = new LinkButton { Text = Text, CssClass = ColumnStyle, CommandName = CommandName, ToolTip = ToolTip };

                if (Click != null) button.Click += Click;

                if (!string.IsNullOrEmpty(Message)) { button.OnClientClick = @"return confirm('" + Message + "');"; }

                cell.Controls.Add(button);
            }
        }