Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewControlCollection.cs / 1 / DataGridViewControlCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System.Collections; using System.Runtime.InteropServices; using System.Diagnostics.CodeAnalysis; namespace System.Windows.Forms { public partial class DataGridView { ///[ ComVisible(false), SuppressMessage("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface") // Consider adding an IList implementation ] public class DataGridViewControlCollection : Control.ControlCollection { DataGridView owner; /// public DataGridViewControlCollection(DataGridView owner) : base(owner) { this.owner = owner; } /// public void CopyTo(Control[] array, int index) { base.CopyTo(array, index); } /// public void Insert(int index, Control value) { ((IList)this).Insert(index, (object)value); } /// public override void Remove(Control value) { if (value != owner.horizScrollBar && value != owner.vertScrollBar && value != this.owner.editingPanel) { base.Remove(value); } } internal void RemoveInternal(Control value) { base.Remove(value); } /// public override void Clear() { for (int i = 0; i < this.Count; i++) { if (this[i] == this.owner.horizScrollBar || this[i] == this.owner.vertScrollBar || this[i] == this.owner.editingPanel) { continue; } else { Remove(this[i]); } } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System.Collections; using System.Runtime.InteropServices; using System.Diagnostics.CodeAnalysis; namespace System.Windows.Forms { public partial class DataGridView { ///[ ComVisible(false), SuppressMessage("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface") // Consider adding an IList implementation ] public class DataGridViewControlCollection : Control.ControlCollection { DataGridView owner; /// public DataGridViewControlCollection(DataGridView owner) : base(owner) { this.owner = owner; } /// public void CopyTo(Control[] array, int index) { base.CopyTo(array, index); } /// public void Insert(int index, Control value) { ((IList)this).Insert(index, (object)value); } /// public override void Remove(Control value) { if (value != owner.horizScrollBar && value != owner.vertScrollBar && value != this.owner.editingPanel) { base.Remove(value); } } internal void RemoveInternal(Control value) { base.Remove(value); } /// public override void Clear() { for (int i = 0; i < this.Count; i++) { if (this[i] == this.owner.horizScrollBar || this[i] == this.owner.vertScrollBar || this[i] == this.owner.editingPanel) { continue; } else { Remove(this[i]); } } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- StringConcat.cs
- IIS7UserPrincipal.cs
- MultiPropertyDescriptorGridEntry.cs
- CompareValidator.cs
- LineInfo.cs
- Update.cs
- RemoteWebConfigurationHostStream.cs
- ProfileService.cs
- CollectionContainer.cs
- CursorConverter.cs
- HttpCacheVaryByContentEncodings.cs
- WebPartConnection.cs
- CompositeControl.cs
- ListControl.cs
- XPathEmptyIterator.cs
- X509CertificateValidator.cs
- SimpleWebHandlerParser.cs
- HighlightVisual.cs
- TreeView.cs
- MonthChangedEventArgs.cs
- SocketElement.cs
- LocalizationParserHooks.cs
- OutputCacheSection.cs
- HtmlGenericControl.cs
- XamlContextStack.cs
- KeyInstance.cs
- DataDocumentXPathNavigator.cs
- PrincipalPermission.cs
- SoapInteropTypes.cs
- StandardBindingElement.cs
- ManifestSignatureInformation.cs
- FixedTextPointer.cs
- MatrixValueSerializer.cs
- ContextMenu.cs
- SingleResultAttribute.cs
- EncryptedPackageFilter.cs
- CodeMemberMethod.cs
- WebZone.cs
- CompilationLock.cs
- SvcMapFile.cs
- StateManagedCollection.cs
- RayHitTestParameters.cs
- ClrPerspective.cs
- Win32Exception.cs
- WebHttpBindingCollectionElement.cs
- RegexParser.cs
- GridViewCancelEditEventArgs.cs
- PixelFormatConverter.cs
- QuadraticBezierSegment.cs
- Rectangle.cs
- MappingItemCollection.cs
- SharedPersonalizationStateInfo.cs
- LicFileLicenseProvider.cs
- MtomMessageEncoder.cs
- FactoryRecord.cs
- SqlDataSourceStatusEventArgs.cs
- CompositeControl.cs
- QilPatternFactory.cs
- CompiledRegexRunnerFactory.cs
- keycontainerpermission.cs
- HiddenField.cs
- NamespaceDisplay.xaml.cs
- PageThemeParser.cs
- ByteAnimationUsingKeyFrames.cs
- OleDbParameter.cs
- CompiledXpathExpr.cs
- SequentialUshortCollection.cs
- EventLogPermissionEntryCollection.cs
- MobileCapabilities.cs
- Int32Rect.cs
- QueryExpr.cs
- ChildTable.cs
- RowUpdatingEventArgs.cs
- BitSet.cs
- MediaElementAutomationPeer.cs
- SerializationEventsCache.cs
- UnaryQueryOperator.cs
- FileDetails.cs
- SplitterDesigner.cs
- DataError.cs
- DesignerAutoFormatCollection.cs
- EventData.cs
- XmlNavigatorStack.cs
- ToolbarAUtomationPeer.cs
- PageThemeParser.cs
- TextTreeExtractElementUndoUnit.cs
- MimeBasePart.cs
- ObjectViewQueryResultData.cs
- PathParser.cs
- MoveSizeWinEventHandler.cs
- LiteralControl.cs
- ChangeToolStripParentVerb.cs
- LogicalChannelCollection.cs
- TextParagraph.cs
- Utils.cs
- ModifyActivitiesPropertyDescriptor.cs
- OleServicesContext.cs
- LinqDataView.cs
- xdrvalidator.cs
- BinaryMethodMessage.cs