Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewControlCollection.cs / 1305376 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ImageUrlEditor.cs
- NewExpression.cs
- FullTextBreakpoint.cs
- SectionVisual.cs
- RenderDataDrawingContext.cs
- RoutingTable.cs
- EventPrivateKey.cs
- _NegoStream.cs
- MatrixTransform3D.cs
- ServicePointManager.cs
- SamlAssertionKeyIdentifierClause.cs
- GridViewEditEventArgs.cs
- FontDialog.cs
- PropagatorResult.cs
- Decimal.cs
- FileSecurity.cs
- GridItemCollection.cs
- RegistryKey.cs
- DesignerDataSchemaClass.cs
- bindurihelper.cs
- _FtpDataStream.cs
- ControlSerializer.cs
- ServiceContractListItemList.cs
- SelectionWordBreaker.cs
- FontStyleConverter.cs
- QuaternionRotation3D.cs
- CompiledQuery.cs
- StylusDevice.cs
- ServicePointManager.cs
- KeyedCollection.cs
- KeyTime.cs
- ThreadAbortException.cs
- Update.cs
- WebBrowserNavigatingEventHandler.cs
- TextElement.cs
- AdRotator.cs
- CachedPathData.cs
- BlockExpression.cs
- SrgsNameValueTag.cs
- TreeBuilderBamlTranslator.cs
- Drawing.cs
- PartialCachingAttribute.cs
- WebServiceHostFactory.cs
- FormsAuthenticationUserCollection.cs
- RuleSettings.cs
- SqlDependencyListener.cs
- UserPreference.cs
- DirtyTextRange.cs
- DataBinder.cs
- AutoGeneratedFieldProperties.cs
- ExpressionConverter.cs
- OracleParameterBinding.cs
- DefaultExpressionVisitor.cs
- PlaceHolder.cs
- SimpleApplicationHost.cs
- BasicCellRelation.cs
- DoubleLinkList.cs
- PackWebRequest.cs
- ScriptReferenceBase.cs
- QueryStringParameter.cs
- UseLicense.cs
- PersonalizationProvider.cs
- CmsInterop.cs
- HandledMouseEvent.cs
- AsymmetricSignatureDeformatter.cs
- LinkLabelLinkClickedEvent.cs
- PackageFilter.cs
- WebPartChrome.cs
- VerificationAttribute.cs
- SafeViewOfFileHandle.cs
- HelpPage.cs
- TableHeaderCell.cs
- MethodBuilder.cs
- Function.cs
- RegexCompilationInfo.cs
- PictureBox.cs
- TypedDatasetGenerator.cs
- SafeArrayTypeMismatchException.cs
- MissingFieldException.cs
- SQLMembershipProvider.cs
- MatrixAnimationBase.cs
- HexParser.cs
- XmlLanguage.cs
- DrawItemEvent.cs
- OracleInternalConnection.cs
- ColorBlend.cs
- XPathNavigatorKeyComparer.cs
- ISessionStateStore.cs
- UserUseLicenseDictionaryLoader.cs
- EncoderParameters.cs
- CompoundFileDeflateTransform.cs
- ExecutionEngineException.cs
- MimeTextImporter.cs
- CqlGenerator.cs
- TraceXPathNavigator.cs
- WmpBitmapDecoder.cs
- PostBackOptions.cs
- ParserOptions.cs
- SequentialWorkflowHeaderFooter.cs
- StyleTypedPropertyAttribute.cs