public virtual string GetValue(System.Web.UI.Control editor) { if (editor as Cell != null) { editor = editor.Controls.Filter <System.Web.UI.Control>().FirstOrDefault() ?? editor; } IContentField contentField = editor as IContentField; if (contentField != null) { return(contentField.GetValue()); } object value = ReflectionUtil.GetProperty(editor, "Value"); return(value == null ? null : value.ToString()); }