Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WebForms / System / Web / UI / Design / DesignerDataSourceView.cs / 1 / DesignerDataSourceView.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.Design {
using System.Collections;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Design;
public abstract class DesignerDataSourceView {
private string _name;
private IDataSourceDesigner _owner;
protected DesignerDataSourceView(IDataSourceDesigner owner, string viewName) {
if (owner == null) {
throw new ArgumentNullException("owner");
}
if (viewName == null) {
throw new ArgumentNullException("viewName");
}
_owner = owner;
_name = viewName;
}
// CanX properties indicate whether the data source allows each
// operation as it is currently configured.
// For instance, a control may allow Deletion, but if a required Delete
// command isn't set, CanDelete should be false, because a Delete
// operation would fail.
public virtual bool CanDelete {
get {
return false;
}
}
public virtual bool CanInsert {
get {
return false;
}
}
public virtual bool CanPage {
get {
return false;
}
}
public virtual bool CanRetrieveTotalRowCount {
get {
return false;
}
}
public virtual bool CanSort {
get {
return false;
}
}
public virtual bool CanUpdate {
get {
return false;
}
}
public IDataSourceDesigner DataSourceDesigner {
get {
return _owner;
}
}
public string Name {
get {
return _name;
}
}
///
/// Provides a schema that describes the data source view represented by
/// the DataSourceView. This allows the designer of a data-bound control
/// to provide intelligent choices based on the DataSourceView that is
/// selected for data binding.
///
///
/// An object describing the view, and the properties of the objects
/// in the list; null if this is unavailable.
///
public virtual IDataSourceViewSchema Schema {
get {
return null;
}
}
///
/// Provides a design-time version of the data source view for use by the
/// data-bound control designer. It is not expected that the designer
/// will perform actual data access at design-time time. The designer
/// may create sample data instead that matches the schema of
/// the data source.
///
///
/// The minimum number of rows to be retrieved.
///
///
/// An output parameter indicating whether the data returned is sample
/// data or real data.
///
///
/// A sample of the data represented by the DataSourceControl; null if the
/// designer cannot generate any sample data.
///
public virtual IEnumerable GetDesignTimeData(int minimumRows, out bool isSampleData) {
isSampleData = true;
//
return DesignTimeData.GetDesignTimeDataSource(DesignTimeData.CreateDummyDataBoundDataTable(), minimumRows);
}
}
}
// 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
- XmlTypeAttribute.cs
- PropertyChangedEventManager.cs
- NamespaceEmitter.cs
- ParsedRoute.cs
- RelatedCurrencyManager.cs
- StateWorkerRequest.cs
- ExpressionWriter.cs
- SourceSwitch.cs
- MenuScrollingVisibilityConverter.cs
- CqlLexerHelpers.cs
- httpstaticobjectscollection.cs
- PictureBox.cs
- SqlRowUpdatingEvent.cs
- SchemaCollectionCompiler.cs
- MenuCommands.cs
- VersionValidator.cs
- StringResourceManager.cs
- CodePrimitiveExpression.cs
- TypeElement.cs
- QueuePropertyVariants.cs
- NativeMethods.cs
- TextElementCollection.cs
- LocatorBase.cs
- UriTemplate.cs
- DiscoveryClientReferences.cs
- ContextMenu.cs
- MouseEventArgs.cs
- TreeViewItemAutomationPeer.cs
- StreamResourceInfo.cs
- FixedTextBuilder.cs
- StopStoryboard.cs
- RankException.cs
- SystemTcpConnection.cs
- TargetInvocationException.cs
- FormViewDeleteEventArgs.cs
- TableLayoutSettingsTypeConverter.cs
- PropertyMetadata.cs
- iisPickupDirectory.cs
- X509CertificateInitiatorClientCredential.cs
- NetMsmqBindingCollectionElement.cs
- TemplateManager.cs
- ViewCellSlot.cs
- CodeTypeMemberCollection.cs
- AdapterUtil.cs
- DrawingCollection.cs
- QueryContinueDragEventArgs.cs
- FocusManager.cs
- Axis.cs
- SettingsPropertyWrongTypeException.cs
- ProfilePropertyNameValidator.cs
- ApplicationContext.cs
- MissingFieldException.cs
- D3DImage.cs
- StatusBarDrawItemEvent.cs
- ListViewGroupConverter.cs
- XmlAttributeOverrides.cs
- ErrorWebPart.cs
- ProxyDataContractResolver.cs
- IteratorAsyncResult.cs
- ViewGenResults.cs
- ObjectDataSourceMethodEventArgs.cs
- ProcessThreadCollection.cs
- RecordConverter.cs
- DynamicDiscoveryDocument.cs
- UnknownBitmapEncoder.cs
- SqlBooleanizer.cs
- GeneralTransformGroup.cs
- ConnectionStringSettingsCollection.cs
- Header.cs
- ThreadPool.cs
- CodeConstructor.cs
- Run.cs
- ItemsControlAutomationPeer.cs
- RootDesignerSerializerAttribute.cs
- XmlChildEnumerator.cs
- InvalidCastException.cs
- RectConverter.cs
- DataTransferEventArgs.cs
- PageBuildProvider.cs
- SymbolType.cs
- EventLogConfiguration.cs
- ToggleButtonAutomationPeer.cs
- DataGridViewDataConnection.cs
- ThreadAbortException.cs
- CodeParameterDeclarationExpression.cs
- ElapsedEventArgs.cs
- Registration.cs
- PatternMatcher.cs
- UriExt.cs
- CrossContextChannel.cs
- HexParser.cs
- HtmlGenericControl.cs
- WorkflowApplicationTerminatedException.cs
- SQLMembershipProvider.cs
- HostExecutionContextManager.cs
- DbDataAdapter.cs
- EntityClientCacheKey.cs
- MimeTypeAttribute.cs
- XPathNodeInfoAtom.cs
- DoubleCollectionConverter.cs