Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / HierarchicalDataSourceControl.cs / 1 / HierarchicalDataSourceControl.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System.ComponentModel; using System.Security.Permissions; [ Bindable(false), ControlBuilder(typeof(DataSourceControlBuilder)), Designer("System.Web.UI.Design.HierarchicalDataSourceDesigner, " + AssemblyRef.SystemDesign), NonVisualControl() ] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public abstract class HierarchicalDataSourceControl : Control, IHierarchicalDataSource { private static readonly object EventDataSourceChanged = new object(); [ EditorBrowsable(EditorBrowsableState.Never), ] public override string ClientID { get { return base.ClientID; } } [ EditorBrowsable(EditorBrowsableState.Never), ] public override ControlCollection Controls { get { return base.Controls; } } [ Browsable(false), DefaultValue(false), EditorBrowsable(EditorBrowsableState.Never), ] public override bool EnableTheming { get { return false; } set { throw new NotSupportedException(SR.GetString(SR.NoThemingSupport, this.GetType().Name)); } } [ Browsable(false), DefaultValue(""), EditorBrowsable(EditorBrowsableState.Never), ] public override string SkinID { get { return String.Empty; } set { throw new NotSupportedException(SR.GetString(SR.NoThemingSupport, this.GetType().Name)); } } ////// Gets or sets a value that indicates whether a control should be rendered on /// the page. /// [ Browsable(false), DefaultValue(false), EditorBrowsable(EditorBrowsableState.Never), ] public override bool Visible { get { return false; } set { throw new NotSupportedException(SR.GetString(SR.ControlNonVisual, this.GetType().Name)); } } [ EditorBrowsable(EditorBrowsableState.Never), ] public override void ApplyStyleSheetSkin(Page page) { base.ApplyStyleSheetSkin(page); } ////// Overidden to prevent child controls from being added to this control. /// protected override ControlCollection CreateControlCollection() { return new EmptyControlCollection(this); } [ EditorBrowsable(EditorBrowsableState.Never), ] public override Control FindControl(string id) { return base.FindControl(id); } ////// [ EditorBrowsable(EditorBrowsableState.Never), ] public override void Focus() { throw new NotSupportedException(SR.GetString(SR.NoFocusSupport, this.GetType().Name)); } protected abstract HierarchicalDataSourceView GetHierarchicalView(string viewPath); [ EditorBrowsable(EditorBrowsableState.Never), ] public override bool HasControls() { return base.HasControls(); } protected virtual void OnDataSourceChanged(EventArgs e) { EventHandler onDataSourceChangedHandler = (EventHandler)Events[EventDataSourceChanged]; if (onDataSourceChangedHandler != null) onDataSourceChangedHandler(this, e); } [ EditorBrowsable(EditorBrowsableState.Never), ] public override void RenderControl(HtmlTextWriter writer) { base.RenderControl(writer); } #region Implementation of IHierarchicalDataSource ////// Raised when the underlying data source has changed. The /// change may be due to a change in the control's properties, /// or a change in the data due to an edit action performed by /// the DataSourceControl. /// event EventHandler IHierarchicalDataSource.DataSourceChanged { add { Events.AddHandler(EventDataSourceChanged, value); } remove { Events.RemoveHandler(EventDataSourceChanged, value); } } ///HierarchicalDataSourceView IHierarchicalDataSource.GetHierarchicalView(string viewPath) { return GetHierarchicalView(viewPath); } #endregion } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- UInt16.cs
- __ConsoleStream.cs
- HttpCapabilitiesBase.cs
- ClientRoleProvider.cs
- XmlCharCheckingReader.cs
- SchemaInfo.cs
- WebPartZoneBase.cs
- HideDisabledControlAdapter.cs
- XmlQualifiedName.cs
- ConnectionPoolManager.cs
- ITextView.cs
- TextInfo.cs
- AuthenticationService.cs
- CqlParser.cs
- WorkflowInstance.cs
- TextEffect.cs
- CompositionCommandSet.cs
- DurationConverter.cs
- CachedCompositeFamily.cs
- NodeCounter.cs
- safemediahandle.cs
- WindowsImpersonationContext.cs
- SQLInt64Storage.cs
- Timer.cs
- RotateTransform.cs
- DecoderBestFitFallback.cs
- Columns.cs
- ClassHandlersStore.cs
- QilScopedVisitor.cs
- PropertyTabChangedEvent.cs
- SequentialWorkflowHeaderFooter.cs
- FlowLayoutPanel.cs
- OutputScopeManager.cs
- SelectionBorderGlyph.cs
- _HelperAsyncResults.cs
- BufferedGraphics.cs
- _NestedMultipleAsyncResult.cs
- StoryFragments.cs
- EntityConnection.cs
- Activation.cs
- ListViewItem.cs
- Serializer.cs
- FrameworkReadOnlyPropertyMetadata.cs
- StreamReader.cs
- SafeViewOfFileHandle.cs
- ListViewTableCell.cs
- DataKeyArray.cs
- ComponentChangingEvent.cs
- ErasingStroke.cs
- DbException.cs
- ClientBuildManager.cs
- Membership.cs
- Splitter.cs
- AutomationPatternInfo.cs
- CollectionBuilder.cs
- AddInEnvironment.cs
- ApplyImportsAction.cs
- XmlWrappingReader.cs
- Compiler.cs
- ClientScriptManager.cs
- VisualStateChangedEventArgs.cs
- IDataContractSurrogate.cs
- SecurityCookieModeValidator.cs
- HitTestParameters.cs
- DataTransferEventArgs.cs
- CollectionAdapters.cs
- PropertySourceInfo.cs
- EncodingStreamWrapper.cs
- WebPartConnectionsConfigureVerb.cs
- SqlExpressionNullability.cs
- ContentType.cs
- HtmlHead.cs
- DataReaderContainer.cs
- TextElementCollection.cs
- PropertyConverter.cs
- InkPresenter.cs
- basenumberconverter.cs
- SpnEndpointIdentityExtension.cs
- InstanceKey.cs
- ProtocolElement.cs
- OleDbSchemaGuid.cs
- TableAdapterManagerMethodGenerator.cs
- UriTemplateLiteralQueryValue.cs
- TrackPoint.cs
- Trace.cs
- XmlTextEncoder.cs
- WebColorConverter.cs
- RichTextBox.cs
- DataGridViewHeaderCell.cs
- PackageStore.cs
- ChangePasswordDesigner.cs
- httpserverutility.cs
- StylusButton.cs
- LineMetrics.cs
- AdPostCacheSubstitution.cs
- StylusPoint.cs
- SiteOfOriginContainer.cs
- UnmanagedMemoryStreamWrapper.cs
- ProgressBar.cs
- Double.cs