Example #1
0
        private void SetPropertyInfo()
        {
            string propertyName = this.PropertyName;

            this.PropertyInfo = this.Model.FieldInfoData.GetFieldDescriptionByMember(propertyName);
            int dotIndex = propertyName.IndexOf(".");

            if (this.propertyInfo == null && dotIndex != -1)
            {
                string parentPath = propertyName.Substring(0, dotIndex);

                var parentFieldInfo = this.Model.FieldInfoData.GetFieldDescriptionByMember(parentPath);
                if (parentFieldInfo != null)
                {
                    IDataFieldInfo info = GridModel.InitializePropertyInfo(propertyName, parentFieldInfo.DataType, parentFieldInfo.RootClassType);
                    if (info != null)
                    {
                        this.PropertyInfo = info;
                        this.Model.FieldInfoData.AddFieldInfoToCache(info);
                    }
                }
            }
        }