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
- DataGridRowDetailsEventArgs.cs
- UrlPath.cs
- PageCatalogPart.cs
- StreamGeometry.cs
- HandleCollector.cs
- SystemEvents.cs
- HelloOperationAsyncResult.cs
- util.cs
- HideDisabledControlAdapter.cs
- FolderNameEditor.cs
- RightsManagementEncryptionTransform.cs
- TextWriterEngine.cs
- InternalCache.cs
- _Semaphore.cs
- ImageSource.cs
- UserInitiatedNavigationPermission.cs
- ListView.cs
- OraclePermissionAttribute.cs
- FamilyMapCollection.cs
- MsmqIntegrationElement.cs
- ConfigXmlSignificantWhitespace.cs
- WhitespaceRuleReader.cs
- DrawingState.cs
- PopOutPanel.cs
- XamlFigureLengthSerializer.cs
- ListCollectionView.cs
- XPathNavigator.cs
- PasswordRecoveryAutoFormat.cs
- VectorAnimationUsingKeyFrames.cs
- MsmqIntegrationBindingElement.cs
- QuaternionValueSerializer.cs
- XslAstAnalyzer.cs
- DbParameterCollectionHelper.cs
- WaitHandleCannotBeOpenedException.cs
- MatrixUtil.cs
- LabelDesigner.cs
- RegularExpressionValidator.cs
- FixedSOMTableRow.cs
- DoubleCollectionValueSerializer.cs
- HttpWriter.cs
- XmlCodeExporter.cs
- CompositeFontFamily.cs
- EdmFunction.cs
- ParsedAttributeCollection.cs
- ExceptionAggregator.cs
- BindUriHelper.cs
- UnsafeNativeMethods.cs
- WebPartTransformer.cs
- FontSource.cs
- TextCollapsingProperties.cs
- HttpWriter.cs
- ADRoleFactoryConfiguration.cs
- CookieProtection.cs
- SafeRightsManagementHandle.cs
- ContextStaticAttribute.cs
- StructuralObject.cs
- RSAOAEPKeyExchangeFormatter.cs
- PathFigure.cs
- MessageAction.cs
- DBPropSet.cs
- UrlMappingsModule.cs
- SemaphoreFullException.cs
- TableCellCollection.cs
- _StreamFramer.cs
- DictionarySectionHandler.cs
- UnsafeNativeMethods.cs
- Line.cs
- UriSectionData.cs
- NamedObject.cs
- ConfigXmlWhitespace.cs
- Visual3D.cs
- LinkTarget.cs
- Calendar.cs
- ColorConvertedBitmapExtension.cs
- TraceUtils.cs
- Nullable.cs
- PropertyEmitter.cs
- LOSFormatter.cs
- TypeListConverter.cs
- TypeElement.cs
- ValueConversionAttribute.cs
- CustomBindingCollectionElement.cs
- DiagnosticsConfiguration.cs
- MulticastDelegate.cs
- TextTreeTextElementNode.cs
- XmlWhitespace.cs
- TreeNodeBindingCollection.cs
- COM2PictureConverter.cs
- ZipIOCentralDirectoryBlock.cs
- TextSearch.cs
- EventPrivateKey.cs
- SafeRightsManagementQueryHandle.cs
- ObjectHandle.cs
- ToolStripRenderer.cs
- DBDataPermissionAttribute.cs
- RestHandlerFactory.cs
- PersianCalendar.cs
- BookmarkCallbackWrapper.cs
- PropertyToken.cs
- EnumType.cs