private void Initialize( string name, PropertyDescriptor propertyDescriptor, string title, string valueXPath, string valuePath, Type dataType, bool isAutoCreated, Nullable<bool> isReadOnly, Nullable<bool> overrideReadOnlyForInsertion, Nullable<bool> isASubRelationship, DataGridForeignKeyDescription foreignKeyDescription ) { this.IsAutoCreated = isAutoCreated; m_valueXPath = valueXPath; m_valuePath = valuePath; m_propertyDescriptor = propertyDescriptor; if( m_propertyDescriptor == null ) { if( ( string.IsNullOrEmpty( m_valueXPath ) ) && ( m_valuePath == "." ) ) m_propertyDescriptor = new SelfPropertyDescriptor( dataType ); } if( m_propertyDescriptor != null ) { this.Browsable = m_propertyDescriptor.IsBrowsable; if( m_propertyDescriptor.IsReadOnly ) isReadOnly = m_propertyDescriptor.IsReadOnly; } if( title == null ) { if( m_propertyDescriptor != null ) { title = m_propertyDescriptor.DisplayName; } } if( isReadOnly == null ) { if( m_propertyDescriptor != null ) { isReadOnly = m_propertyDescriptor.IsReadOnly; } } if( dataType == null ) { if( m_propertyDescriptor != null ) { dataType = m_propertyDescriptor.PropertyType; } } this.ForeignKeyDescription = foreignKeyDescription; base.Initialize( name, title, dataType, isReadOnly, overrideReadOnlyForInsertion, isASubRelationship ); }
private void Initialize( string name, PropertyDescriptor propertyDescriptor, string title, string valueXPath, string valuePath, Type dataType, bool isAutoCreated, Nullable <bool> isReadOnly, Nullable <bool> overrideReadOnlyForInsertion, Nullable <bool> isASubRelationship, DataGridForeignKeyDescription foreignKeyDescription) { this.IsAutoCreated = isAutoCreated; m_valueXPath = valueXPath; m_valuePath = valuePath; m_propertyDescriptor = propertyDescriptor; if (m_propertyDescriptor == null) { if ((string.IsNullOrEmpty(m_valueXPath)) && (m_valuePath == ".")) { m_propertyDescriptor = new SelfPropertyDescriptor(dataType); } } if (m_propertyDescriptor != null) { this.Browsable = m_propertyDescriptor.IsBrowsable; if (m_propertyDescriptor.IsReadOnly) { isReadOnly = m_propertyDescriptor.IsReadOnly; } } if (title == null) { if (m_propertyDescriptor != null) { title = m_propertyDescriptor.DisplayName; } } if (isReadOnly == null) { if (m_propertyDescriptor != null) { isReadOnly = m_propertyDescriptor.IsReadOnly; } } if (dataType == null) { if (m_propertyDescriptor != null) { dataType = m_propertyDescriptor.PropertyType; } } this.ForeignKeyDescription = foreignKeyDescription; base.Initialize(name, title, dataType, isReadOnly, overrideReadOnlyForInsertion, isASubRelationship); }