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
- ClientProxyGenerator.cs
- Timer.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- EntryWrittenEventArgs.cs
- FileReservationCollection.cs
- Int64Storage.cs
- ResourceContainer.cs
- DataKey.cs
- Win32SafeHandles.cs
- XmlMapping.cs
- Error.cs
- ImageMapEventArgs.cs
- TextTreeInsertUndoUnit.cs
- GridViewCellAutomationPeer.cs
- ExceptQueryOperator.cs
- SQLBinary.cs
- RightsManagementEncryptedStream.cs
- _UriTypeConverter.cs
- RichTextBox.cs
- Rfc2898DeriveBytes.cs
- StyleTypedPropertyAttribute.cs
- ThreadAbortException.cs
- WindowsContainer.cs
- SortKey.cs
- ConnectionStringSettingsCollection.cs
- Path.cs
- SmiTypedGetterSetter.cs
- PeerInvitationResponse.cs
- SecurityDocument.cs
- CompilerGeneratedAttribute.cs
- EtwTrace.cs
- ManagementException.cs
- GridViewDeletedEventArgs.cs
- WebPartVerb.cs
- BitmapEffectGeneralTransform.cs
- DnsPermission.cs
- RoutingTable.cs
- DetailsViewCommandEventArgs.cs
- MultipleViewPattern.cs
- TextDecoration.cs
- PageCache.cs
- LinkClickEvent.cs
- DataGridViewColumnHeaderCell.cs
- WinFormsSecurity.cs
- PeerName.cs
- EmbossBitmapEffect.cs
- ToolStripRenderer.cs
- HwndProxyElementProvider.cs
- CollectionDataContractAttribute.cs
- EraserBehavior.cs
- PasswordBox.cs
- DBParameter.cs
- OverflowException.cs
- LineBreakRecord.cs
- RegexCode.cs
- ProtocolsConfigurationEntry.cs
- PackageProperties.cs
- DataPagerFieldItem.cs
- GeneralTransform3DTo2D.cs
- TemplateControlCodeDomTreeGenerator.cs
- NaturalLanguageHyphenator.cs
- Vector3D.cs
- FieldAccessException.cs
- SizeChangedInfo.cs
- FontStyles.cs
- DocumentEventArgs.cs
- XmlJsonReader.cs
- IImplicitResourceProvider.cs
- CallSite.cs
- TextElement.cs
- Math.cs
- DataGridViewCellStateChangedEventArgs.cs
- DetailsView.cs
- ReceiveContextCollection.cs
- FactoryRecord.cs
- MaskInputRejectedEventArgs.cs
- TableChangeProcessor.cs
- UInt16Converter.cs
- CompensatableSequenceActivity.cs
- LayoutUtils.cs
- DataKey.cs
- DataFormats.cs
- MimePart.cs
- PriorityQueue.cs
- DrawingVisual.cs
- DecoderReplacementFallback.cs
- ComponentRenameEvent.cs
- TrackBarRenderer.cs
- SRef.cs
- Border.cs
- StrongNameMembershipCondition.cs
- DecimalStorage.cs
- SequenceQuery.cs
- MetafileHeaderWmf.cs
- CollectionType.cs
- EncryptedKeyIdentifierClause.cs
- DataGridCellsPanel.cs
- ISO2022Encoding.cs
- EdmFunctionAttribute.cs
- XmlWrappingReader.cs