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
- AudioFormatConverter.cs
- ListManagerBindingsCollection.cs
- SettingsBase.cs
- XmlCodeExporter.cs
- SQLMembershipProvider.cs
- SecurityUniqueId.cs
- WmiEventSink.cs
- SessionStateContainer.cs
- MenuBase.cs
- HtmlDocument.cs
- SqlDataSourceStatusEventArgs.cs
- ToolStripRenderEventArgs.cs
- ServerIdentity.cs
- FlowDocumentFormatter.cs
- GridViewRowEventArgs.cs
- Column.cs
- SapiRecoInterop.cs
- PermissionSetEnumerator.cs
- DataTable.cs
- GetLedgerEntryForRecipientRequest.cs
- EncodingConverter.cs
- TickBar.cs
- ConfigurationStrings.cs
- StylusEditingBehavior.cs
- DataControlField.cs
- DataGridLinkButton.cs
- NullableBoolConverter.cs
- TextEncodedRawTextWriter.cs
- SmiEventStream.cs
- Page.cs
- _NestedSingleAsyncResult.cs
- MergeFilterQuery.cs
- XmlUrlResolver.cs
- BoundPropertyEntry.cs
- ExpressionTable.cs
- Registry.cs
- GradientStop.cs
- DateTimeFormat.cs
- IApplicationTrustManager.cs
- UserNamePasswordClientCredential.cs
- BuildDependencySet.cs
- DataGridViewAdvancedBorderStyle.cs
- ParameterCollection.cs
- FrameworkElementAutomationPeer.cs
- RuntimeEnvironment.cs
- ElementHost.cs
- Publisher.cs
- TrustLevelCollection.cs
- HandledEventArgs.cs
- OraclePermissionAttribute.cs
- XPathSingletonIterator.cs
- UndoManager.cs
- KeyboardNavigation.cs
- XmlUtil.cs
- LoginUtil.cs
- TextRange.cs
- Calendar.cs
- mda.cs
- SharedConnectionInfo.cs
- FixedDocumentSequencePaginator.cs
- BitmapMetadataEnumerator.cs
- HttpResponseWrapper.cs
- SqlDataReader.cs
- CodeExporter.cs
- EdmScalarPropertyAttribute.cs
- SafeNativeMethods.cs
- Internal.cs
- CodePageUtils.cs
- Base64Decoder.cs
- DoubleKeyFrameCollection.cs
- OptimalBreakSession.cs
- SemaphoreFullException.cs
- MediaSystem.cs
- DataControlFieldCell.cs
- GeneralTransform3DTo2D.cs
- Bind.cs
- AspCompat.cs
- WebServiceClientProxyGenerator.cs
- SessionStateContainer.cs
- BufferedGraphics.cs
- BinaryReader.cs
- OpCodes.cs
- CompModSwitches.cs
- basecomparevalidator.cs
- TableLayoutCellPaintEventArgs.cs
- ColumnMapTranslator.cs
- Token.cs
- StickyNoteAnnotations.cs
- DPCustomTypeDescriptor.cs
- WSTrustFeb2005.cs
- TypeElement.cs
- DbParameterCollectionHelper.cs
- ProfilePropertySettings.cs
- RectangleConverter.cs
- GridViewCellAutomationPeer.cs
- PromptBuilder.cs
- activationcontext.cs
- Missing.cs
- FilterableData.cs
- WindowsPen.cs