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
- SqlConnectionStringBuilder.cs
- AuthenticationModulesSection.cs
- SecurityContextSecurityToken.cs
- FtpCachePolicyElement.cs
- RuntimeCompatibilityAttribute.cs
- XdrBuilder.cs
- SystemInfo.cs
- ProfilePropertySettingsCollection.cs
- AjaxFrameworkAssemblyAttribute.cs
- SectionInformation.cs
- PageClientProxyGenerator.cs
- SubqueryRules.cs
- AuthenticationConfig.cs
- CircleHotSpot.cs
- WindowsRichEditRange.cs
- CachedPathData.cs
- MetafileHeaderWmf.cs
- WebPartDeleteVerb.cs
- MsmqReceiveParameters.cs
- WebDescriptionAttribute.cs
- FileDialogCustomPlacesCollection.cs
- ContextMenuAutomationPeer.cs
- SqlDataSourceParameterParser.cs
- HtmlPanelAdapter.cs
- sortedlist.cs
- GridViewDeleteEventArgs.cs
- SafeBitVector32.cs
- DefaultValueConverter.cs
- GridViewPageEventArgs.cs
- GenericEnumerator.cs
- StoreContentChangedEventArgs.cs
- DataGridViewCellStyleChangedEventArgs.cs
- SqlException.cs
- BasicBrowserDialog.cs
- PerformanceCounterPermissionAttribute.cs
- ButtonFlatAdapter.cs
- CustomServiceCredentials.cs
- XMLSyntaxException.cs
- ComponentResourceKey.cs
- Simplifier.cs
- XmlWriterDelegator.cs
- xmlglyphRunInfo.cs
- DataControlFieldsEditor.cs
- Assembly.cs
- BrowserCapabilitiesCompiler.cs
- KeyboardEventArgs.cs
- Identifier.cs
- HtmlSelect.cs
- XmlDataDocument.cs
- ProgressChangedEventArgs.cs
- LocalFileSettingsProvider.cs
- GlobalizationSection.cs
- DiscoveryClientOutputChannel.cs
- StrongNameKeyPair.cs
- ProjectedSlot.cs
- _KerberosClient.cs
- HashAlgorithm.cs
- HttpDictionary.cs
- ClientCultureInfo.cs
- EncoderReplacementFallback.cs
- IPCCacheManager.cs
- ScaleTransform.cs
- HtmlTextArea.cs
- MetafileHeaderWmf.cs
- ServiceReference.cs
- FilteredDataSetHelper.cs
- FileLoadException.cs
- ObfuscateAssemblyAttribute.cs
- HitTestParameters.cs
- TemplateField.cs
- SqlProcedureAttribute.cs
- GridViewDeletedEventArgs.cs
- SelectionPattern.cs
- ObjectComplexPropertyMapping.cs
- StreamInfo.cs
- HashHelper.cs
- OdbcFactory.cs
- IssuanceTokenProviderBase.cs
- Semaphore.cs
- FormatterServicesNoSerializableCheck.cs
- DrawingBrush.cs
- SqlBulkCopyColumnMappingCollection.cs
- NetStream.cs
- LogicalChannel.cs
- UICuesEvent.cs
- nulltextnavigator.cs
- RelationshipEndCollection.cs
- RootNamespaceAttribute.cs
- ApplicationProxyInternal.cs
- DetailsViewInsertedEventArgs.cs
- RootAction.cs
- HttpListenerContext.cs
- BitmapEffectState.cs
- ItemsChangedEventArgs.cs
- XmlSchemaSimpleContent.cs
- GridViewUpdateEventArgs.cs
- TextRangeSerialization.cs
- BaseAddressElement.cs
- Maps.cs
- ClientRuntime.cs