Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewSelectedRowCollection.cs / 1 / DataGridViewSelectedRowCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Windows.Forms { using System.Diagnostics; using System; using System.Collections; using System.Windows.Forms; using System.ComponentModel; using System.Globalization; using System.Diagnostics.CodeAnalysis; ////// /// [ ListBindable(false), SuppressMessage("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface") // Consider adding an IListRepresents a collection of selected ///objects in the /// control. implementation ] public class DataGridViewSelectedRowCollection : BaseCollection, IList { ArrayList items = new ArrayList(); /// /// int IList.Add(object value) { throw new NotSupportedException(SR.GetString(SR.DataGridView_ReadOnlyCollection)); } /// /// void IList.Clear() { throw new NotSupportedException(SR.GetString(SR.DataGridView_ReadOnlyCollection)); } /// /// bool IList.Contains(object value) { return this.items.Contains(value); } /// /// int IList.IndexOf(object value) { return this.items.IndexOf(value); } /// /// void IList.Insert(int index, object value) { throw new NotSupportedException(SR.GetString(SR.DataGridView_ReadOnlyCollection)); } /// /// void IList.Remove(object value) { throw new NotSupportedException(SR.GetString(SR.DataGridView_ReadOnlyCollection)); } /// /// void IList.RemoveAt(int index) { throw new NotSupportedException(SR.GetString(SR.DataGridView_ReadOnlyCollection)); } /// /// bool IList.IsFixedSize { get { return true; } } /// /// bool IList.IsReadOnly { get { return true; } } /// /// object IList.this[int index] { get { return this.items[index]; } set { throw new NotSupportedException(SR.GetString(SR.DataGridView_ReadOnlyCollection)); } } /// /// void ICollection.CopyTo(Array array, int index) { this.items.CopyTo(array, index); } /// /// int ICollection.Count { get { return this.items.Count; } } /// /// bool ICollection.IsSynchronized { get { return false; } } /// /// object ICollection.SyncRoot { get { return this; } } /// /// IEnumerator IEnumerable.GetEnumerator() { return this.items.GetEnumerator(); } internal DataGridViewSelectedRowCollection() { } /// protected override ArrayList List { get { return this.items; } } /// public DataGridViewRow this[int index] { get { return (DataGridViewRow) this.items[index]; } } /// /// /// internal int Add(DataGridViewRow dataGridViewRow) { return this.items.Add(dataGridViewRow); } /* Unused at this point internal void AddRange(DataGridViewRow[] dataGridViewRows) { Debug.Assert(dataGridViewRows != null); foreach(DataGridViewRow dataGridViewRow in dataGridViewRows) { this.items.Add(dataGridViewRow); } } internal void AddRowCollection(DataGridViewRowCollection dataGridViewRows) { Debug.Assert(dataGridViewRows != null); foreach(DataGridViewRow dataGridViewRow in dataGridViewRows) { this.items.Add(dataGridViewRow); } } */ ///Adds a ///to this collection. [ EditorBrowsable(EditorBrowsableState.Never) ] public void Clear() { throw new NotSupportedException(SR.GetString(SR.DataGridView_ReadOnlyCollection)); } /// /// /// Checks to see if a DataGridViewCell is contained in this collection. /// public bool Contains(DataGridViewRow dataGridViewRow) { return this.items.IndexOf(dataGridViewRow) != -1; } ///public void CopyTo(DataGridViewRow[] array, int index) { this.items.CopyTo(array, index); } /// [ EditorBrowsable(EditorBrowsableState.Never), SuppressMessage("Microsoft.Performance", "CA1801:AvoidUnusedParameters") ] public void Insert(int index, DataGridViewRow dataGridViewRow) { throw new NotSupportedException(SR.GetString(SR.DataGridView_ReadOnlyCollection)); } } } // 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
- SqlExpander.cs
- EntityDataSourceContextDisposingEventArgs.cs
- RsaEndpointIdentity.cs
- PrimaryKeyTypeConverter.cs
- GlyphShapingProperties.cs
- ResourceContainerWrapper.cs
- BinaryObjectReader.cs
- Matrix3DConverter.cs
- MailAddressCollection.cs
- TimerElapsedEvenArgs.cs
- DescendantOverDescendantQuery.cs
- WindowsMenu.cs
- ItemCheckEvent.cs
- WhitespaceSignificantCollectionAttribute.cs
- BaseDataList.cs
- ComplexObject.cs
- OracleParameterCollection.cs
- XmlSchemaInfo.cs
- IsolatedStorageFile.cs
- FragmentQueryProcessor.cs
- NavigationWindowAutomationPeer.cs
- WindowsSolidBrush.cs
- VectorCollection.cs
- TextServicesCompartmentContext.cs
- CLRBindingWorker.cs
- TextTreeRootNode.cs
- CodeIterationStatement.cs
- AnimationClock.cs
- WebServiceParameterData.cs
- BinaryFormatter.cs
- ParallelLoopState.cs
- GeneralTransform3DGroup.cs
- SecurityRuntime.cs
- GridViewItemAutomationPeer.cs
- WindowsTooltip.cs
- EdgeProfileValidation.cs
- FormClosingEvent.cs
- IsolatedStorageFilePermission.cs
- GridViewUpdatedEventArgs.cs
- DbDataAdapter.cs
- DataContractSerializerElement.cs
- ApplicationFileParser.cs
- NavigationService.cs
- SQLInt64.cs
- HealthMonitoringSection.cs
- TCPClient.cs
- XmlQueryContext.cs
- NotifyIcon.cs
- SplineKeyFrames.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- Form.cs
- RuleEngine.cs
- Button.cs
- Rectangle.cs
- _SslState.cs
- ThemeDictionaryExtension.cs
- XmlHierarchyData.cs
- XmlNamespaceMapping.cs
- HttpHostedTransportConfiguration.cs
- SessionStateUtil.cs
- DateTimeOffsetConverter.cs
- SqlParameter.cs
- StylusPointPropertyInfo.cs
- InputProviderSite.cs
- BulletedList.cs
- recordstatefactory.cs
- UrlAuthorizationModule.cs
- AssertSection.cs
- _ConnectStream.cs
- UnmanagedMarshal.cs
- TextBreakpoint.cs
- RequestCacheValidator.cs
- PreviewPageInfo.cs
- ExtendedPropertyCollection.cs
- XhtmlConformanceSection.cs
- ExceptionUtil.cs
- XLinq.cs
- ByteConverter.cs
- ITextView.cs
- FormatterConverter.cs
- Simplifier.cs
- MessageDecoder.cs
- PropertyBuilder.cs
- EncoderParameter.cs
- ComponentCollection.cs
- BaseAddressPrefixFilterElement.cs
- storepermission.cs
- CurrentTimeZone.cs
- DBDataPermissionAttribute.cs
- UndirectedGraph.cs
- EntityDataReader.cs
- QueuePathDialog.cs
- XmlUtf8RawTextWriter.cs
- FacetDescriptionElement.cs
- TypeListConverter.cs
- TextRenderer.cs
- FullTrustAssembly.cs
- DrawingAttributesDefaultValueFactory.cs
- ItemCheckedEvent.cs
- MimeBasePart.cs