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
- parserscommon.cs
- Evidence.cs
- InfoCardClaimCollection.cs
- CalculatedColumn.cs
- RegexCharClass.cs
- TextTreeUndo.cs
- WebPartDeleteVerb.cs
- SelectionChangedEventArgs.cs
- WebPartMinimizeVerb.cs
- KeysConverter.cs
- EntityDataSourceDesigner.cs
- Item.cs
- StandardToolWindows.cs
- SqlProfileProvider.cs
- GeneralTransform3DTo2DTo3D.cs
- XmlDownloadManager.cs
- ArrangedElement.cs
- DataServiceClientException.cs
- DataGridViewCellStateChangedEventArgs.cs
- URI.cs
- ValidationPropertyAttribute.cs
- Compiler.cs
- XmlElementAttributes.cs
- EqualityArray.cs
- XmlDownloadManager.cs
- TextRangeAdaptor.cs
- XsltArgumentList.cs
- SrgsGrammar.cs
- PnrpPeerResolverBindingElement.cs
- ListSortDescriptionCollection.cs
- MethodRental.cs
- StylusButtonCollection.cs
- PixelFormatConverter.cs
- Serializer.cs
- HandlerBase.cs
- FileDialog.cs
- HttpCookieCollection.cs
- StaticFileHandler.cs
- WebResourceUtil.cs
- SvcMapFile.cs
- JavaScriptObjectDeserializer.cs
- OrthographicCamera.cs
- MetricEntry.cs
- OutputScopeManager.cs
- TileBrush.cs
- PropertyCollection.cs
- ControlParameter.cs
- DurationConverter.cs
- BitmapPalettes.cs
- ErrorProvider.cs
- DataSourceConverter.cs
- PassportIdentity.cs
- UpdatePanelTriggerCollection.cs
- DataBindEngine.cs
- ObjectKeyFrameCollection.cs
- IdleTimeoutMonitor.cs
- ListDictionary.cs
- ToolStripMenuItemCodeDomSerializer.cs
- BindMarkupExtensionSerializer.cs
- BitmapSource.cs
- DataProviderNameConverter.cs
- UpdatePanelTriggerCollection.cs
- SkewTransform.cs
- ServiceNameElement.cs
- DiscoveryClientBindingElement.cs
- WindowsListViewScroll.cs
- PackWebResponse.cs
- MessageDecoder.cs
- CalendarDay.cs
- WebPartCancelEventArgs.cs
- EndPoint.cs
- _PooledStream.cs
- StringWriter.cs
- ControlCollection.cs
- CodeGroup.cs
- SafeHandles.cs
- ISCIIEncoding.cs
- PropertyInformation.cs
- SecurityHelper.cs
- SystemIPv4InterfaceProperties.cs
- GridViewDeletedEventArgs.cs
- DocumentGridContextMenu.cs
- QueryExtender.cs
- ScriptingAuthenticationServiceSection.cs
- EditorPartChrome.cs
- ComPlusServiceLoader.cs
- Types.cs
- TraceSection.cs
- AutoResizedEvent.cs
- SqlDataSourceFilteringEventArgs.cs
- StorageRoot.cs
- MsmqMessageSerializationFormat.cs
- SchemaName.cs
- DataControlFieldTypeEditor.cs
- BitmapEffectDrawingContent.cs
- WebPartMenu.cs
- RowVisual.cs
- MailMessageEventArgs.cs
- DependencyProperty.cs
- HtmlInputCheckBox.cs