public override string GetDisplayText(DevExpress.Utils.FormatInfo format, object editValue)
        {
            if (string.IsNullOrEmpty(EntityName))
            {
                return(base.GetDisplayText(format, editValue));
            }
            if (DataSource == null && !IsNullValue(editValue) && !IsNullOrEmptyGuiId(editValue))
            {
                var serviceContext = new DynamicDataServiceContext();
                var displayValue   = serviceContext.GetPropertyValue(EntityName, editValue, DisplayMember);
                if (displayValue != null)
                {
                    return(displayValue.ToString());
                }
                return(GetNullEditText());
            }
            if (IsNullValue(editValue))
            {
                return(base.GetDisplayText(format, editValue));
            }
            object res = GetDisplayTextByKeyValueCore(editValue);

            if (BaseEdit.IsNotLoadedValue(res))
            {
                //if (OwnerEdit != null) OwnerEdit.requireUpdateDisplayText = true;
                return(string.Empty);
            }
            if (res == null)
            {
                return(string.Empty);
            }
            return(res.ToString());
        }
        public string GetDisplayTextByKeyValue(object keyValue, string displayMember)
        {
            var displayValue = _context.GetPropertyValue(_entityName, keyValue, displayMember);

            if (displayValue != null)
            {
                return(displayValue.ToString());
            }
            return(string.Empty);
        }