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);
}
}