Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / DynamicData / DynamicData / ModelProviders / SimpleColumnProvider.cs / 1407647 / SimpleColumnProvider.cs
namespace System.Web.DynamicData.ModelProviders { using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Web.Resources; internal sealed class SimpleColumnProvider : ColumnProvider { public SimpleColumnProvider(TableProvider tableProvider, PropertyDescriptor propertyDescriptor) : base(tableProvider) { if (propertyDescriptor.PropertyType == null) { throw new ArgumentNullException(DynamicDataResources.SimpleColumnProvider_ColumnTypeRequired); } Name = propertyDescriptor.Name; ColumnType = propertyDescriptor.PropertyType; IsPrimaryKey = propertyDescriptor.Attributes.OfType().Any(); Nullable = Misc.TypeAllowsNull(ColumnType); IsReadOnly = propertyDescriptor.IsReadOnly; IsSortable = true; } public override AttributeCollection Attributes { get { if (!Misc.IsBindableType(ColumnType)) { return AttributeCollection.FromExisting(base.Attributes, new ScaffoldColumnAttribute(false)); } return base.Attributes; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- UriTemplatePathPartiallyEquivalentSet.cs
- PropertyChangingEventArgs.cs
- MouseButtonEventArgs.cs
- CodeVariableDeclarationStatement.cs
- DbgUtil.cs
- PropertyInfoSet.cs
- ELinqQueryState.cs
- CharEnumerator.cs
- RegularExpressionValidator.cs
- HideDisabledControlAdapter.cs
- XamlBrushSerializer.cs
- TransferRequestHandler.cs
- BoolLiteral.cs
- CodeTypeReferenceExpression.cs
- DataGridPageChangedEventArgs.cs
- NameValueFileSectionHandler.cs
- MemberMemberBinding.cs
- Geometry.cs
- BulletedListEventArgs.cs
- CheckBox.cs
- SafeNativeMethodsOther.cs
- TripleDESCryptoServiceProvider.cs
- OutputCacheProviderCollection.cs
- DocumentEventArgs.cs
- XmlArrayItemAttribute.cs
- IProvider.cs
- followingquery.cs
- HostUtils.cs
- X509Extension.cs
- UpnEndpointIdentityExtension.cs
- FormViewAutoFormat.cs
- FrameworkContentElement.cs
- TypeLoadException.cs
- EventMap.cs
- XmlAttributeCache.cs
- DeploymentSection.cs
- PatternMatcher.cs
- BasicCellRelation.cs
- CodeConstructor.cs
- AutoSizeComboBox.cs
- UrlMappingCollection.cs
- PreviewKeyDownEventArgs.cs
- TrackingRecord.cs
- behaviorssection.cs
- XmlCountingReader.cs
- ClientUrlResolverWrapper.cs
- DesignerView.cs
- RemotingConfigParser.cs
- Dump.cs
- SpecialNameAttribute.cs
- OdbcRowUpdatingEvent.cs
- Polygon.cs
- DefaultSettingsSection.cs
- SiteMapPath.cs
- TextRunTypographyProperties.cs
- PrivilegeNotHeldException.cs
- NativeMethods.cs
- VersionedStream.cs
- SaveFileDialog.cs
- GradientStopCollection.cs
- BrowserCapabilitiesCompiler.cs
- DesignerActionList.cs
- EntityDesignerBuildProvider.cs
- SqlReferenceCollection.cs
- CutCopyPasteHelper.cs
- CodeAssignStatement.cs
- CustomValidator.cs
- XamlSerializerUtil.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- ServiceOperation.cs
- ToolBarButtonClickEvent.cs
- TraceProvider.cs
- NoPersistHandle.cs
- HttpProfileBase.cs
- PersonalizationAdministration.cs
- CodeEntryPointMethod.cs
- SchemaImporter.cs
- NumericUpDownAcceleration.cs
- CellTreeSimplifier.cs
- TreeNodeBindingCollection.cs
- Int16Animation.cs
- columnmapkeybuilder.cs
- AuthenticationManager.cs
- mediaeventshelper.cs
- TreeNode.cs
- OciEnlistContext.cs
- UnsafeNativeMethods.cs
- ObjectSet.cs
- HttpConfigurationContext.cs
- ConfigurationSectionGroup.cs
- EventLogTraceListener.cs
- KeyEvent.cs
- FileVersionInfo.cs
- DrawingAttributeSerializer.cs
- SmtpNetworkElement.cs
- HyperlinkAutomationPeer.cs
- ArrangedElement.cs
- DataGridViewSortCompareEventArgs.cs
- TreeIterators.cs
- TemplatedWizardStep.cs