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
- RowToFieldTransformer.cs
- RegexWriter.cs
- PropertyTabAttribute.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- Directory.cs
- Metadata.cs
- ComAdminInterfaces.cs
- SourceLocationProvider.cs
- Converter.cs
- Vars.cs
- DrawTreeNodeEventArgs.cs
- x509utils.cs
- XmlDsigSep2000.cs
- ZoneIdentityPermission.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- WmlPageAdapter.cs
- TextElementEnumerator.cs
- XmlLanguageConverter.cs
- DateTimeOffsetConverter.cs
- UnsafeNativeMethodsPenimc.cs
- StringConcat.cs
- SchemaCollectionCompiler.cs
- WorkflowServiceBuildProvider.cs
- LinkDesigner.cs
- GridSplitterAutomationPeer.cs
- UIntPtr.cs
- ThreadAttributes.cs
- AgileSafeNativeMemoryHandle.cs
- Item.cs
- DataChangedEventManager.cs
- WebPartTransformerAttribute.cs
- DataTableNewRowEvent.cs
- UserPreferenceChangingEventArgs.cs
- OleDbDataReader.cs
- ProtocolsConfigurationHandler.cs
- ToolBarButtonClickEvent.cs
- ImageBrush.cs
- XmlSerializerFactory.cs
- StringWriter.cs
- NavigationProperty.cs
- HotSpotCollection.cs
- XmlBufferReader.cs
- XmlWhitespace.cs
- TableStyle.cs
- RuntimeEnvironment.cs
- DataGridRowHeader.cs
- NameValuePair.cs
- LazyTextWriterCreator.cs
- EncryptedKey.cs
- InputLangChangeEvent.cs
- ToolstripProfessionalRenderer.cs
- TextProperties.cs
- Ref.cs
- StateBag.cs
- MouseButtonEventArgs.cs
- WSFederationHttpBindingElement.cs
- Point3DConverter.cs
- RegexCode.cs
- ScrollViewer.cs
- UpdateProgress.cs
- WebResponse.cs
- ForeignConstraint.cs
- Debug.cs
- AdvancedBindingPropertyDescriptor.cs
- Configuration.cs
- EntityContainerRelationshipSet.cs
- LinkButton.cs
- ThrowHelper.cs
- Imaging.cs
- AppDomainUnloadedException.cs
- BulletChrome.cs
- UnaryOperationBinder.cs
- DataSvcMapFileSerializer.cs
- FixedSOMTable.cs
- GeneralTransform3D.cs
- CqlGenerator.cs
- MouseOverProperty.cs
- DrawingAttributesDefaultValueFactory.cs
- ActivityStatusChangeEventArgs.cs
- CharacterHit.cs
- BindStream.cs
- LazyTextWriterCreator.cs
- GatewayDefinition.cs
- Stylus.cs
- Camera.cs
- SettingsPropertyIsReadOnlyException.cs
- TextServicesCompartmentEventSink.cs
- SystemIPAddressInformation.cs
- DataObject.cs
- SharedPerformanceCounter.cs
- PolicyStatement.cs
- NetCodeGroup.cs
- ElementsClipboardData.cs
- CombinedHttpChannel.cs
- Color.cs
- CheckBoxStandardAdapter.cs
- TaskHelper.cs
- hebrewshape.cs
- UIElement.cs
- Clipboard.cs