protected virtual void InitializeDataCell (DataControlFieldCell cell, DataControlRowState rowState) { bool editable = (rowState & (DataControlRowState.Edit | DataControlRowState.Insert)) != 0; if (editable && !ReadOnly) { TextBox box = new TextBox (); cell.Controls.Add (box); } else if (DataImageUrlField.Length > 0) { Image img = new Image (); img.ControlStyle.CopyFrom (ControlStyle); cell.Controls.Add (img); } }