Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / UI / HtmlControls / HtmlTableRowCollection.cs / 1 / HtmlTableRowCollection.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
* HtmlTableRowCollection.cs
*
* Copyright (c) 2000 Microsoft Corporation
*/
namespace System.Web.UI.HtmlControls {
using System.Runtime.InteropServices;
using System;
using System.Collections;
using System.Web;
using System.Web.UI;
using System.Security.Permissions;
///
///
/// The contains all
/// of the table rows found within an
/// server control.
///
///
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public sealed class HtmlTableRowCollection : ICollection {
///
///
///
private HtmlTable owner;
internal HtmlTableRowCollection(HtmlTable owner) {
this.owner = owner;
}
/*
* The number of cells in the row.
*/
///
///
/// Gets the number of items in the
///
/// collection.
///
///
public int Count {
get {
if (owner.HasControls())
return owner.Controls.Count;
return 0;
}
}
///
///
/// Gets an control from an
/// control thorugh the row's ordinal index value.
///
///
public HtmlTableRow this[int index]
{
get {
return(HtmlTableRow)owner.Controls[index];
}
}
///
///
/// Adds the specified HtmlTableRow control to the end of the collection.
///
///
public void Add(HtmlTableRow row) {
Insert(-1, row);
}
///
///
/// Adds an control to a specified
/// location in the collection.
///
///
public void Insert(int index, HtmlTableRow row) {
owner.Controls.AddAt(index, row);
}
///
///
/// Deletes all controls from the collection.
///
///
public void Clear() {
if (owner.HasControls())
owner.Controls.Clear();
}
///
/// [To be supplied.]
///
public void CopyTo(Array array, int index) {
for (IEnumerator e = this.GetEnumerator(); e.MoveNext();)
array.SetValue(e.Current, index++);
}
///
///
public Object SyncRoot {
get { return this;}
}
///
///
public bool IsReadOnly {
get { return false;}
}
///
///
public bool IsSynchronized {
get { return false;}
}
///
///
public IEnumerator GetEnumerator() {
return owner.Controls.GetEnumerator();
}
///
///
/// Deletes the specified
/// control
/// from the collection.
///
///
public void Remove(HtmlTableRow row) {
owner.Controls.Remove(row);
}
///
///
/// Deletes the control at the specified index
/// location from the collection.
///
///
public void RemoveAt(int index) {
owner.Controls.RemoveAt(index);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
* HtmlTableRowCollection.cs
*
* Copyright (c) 2000 Microsoft Corporation
*/
namespace System.Web.UI.HtmlControls {
using System.Runtime.InteropServices;
using System;
using System.Collections;
using System.Web;
using System.Web.UI;
using System.Security.Permissions;
///
///
/// The contains all
/// of the table rows found within an
/// server control.
///
///
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public sealed class HtmlTableRowCollection : ICollection {
///
///
///
private HtmlTable owner;
internal HtmlTableRowCollection(HtmlTable owner) {
this.owner = owner;
}
/*
* The number of cells in the row.
*/
///
///
/// Gets the number of items in the
///
/// collection.
///
///
public int Count {
get {
if (owner.HasControls())
return owner.Controls.Count;
return 0;
}
}
///
///
/// Gets an control from an
/// control thorugh the row's ordinal index value.
///
///
public HtmlTableRow this[int index]
{
get {
return(HtmlTableRow)owner.Controls[index];
}
}
///
///
/// Adds the specified HtmlTableRow control to the end of the collection.
///
///
public void Add(HtmlTableRow row) {
Insert(-1, row);
}
///
///
/// Adds an control to a specified
/// location in the collection.
///
///
public void Insert(int index, HtmlTableRow row) {
owner.Controls.AddAt(index, row);
}
///
///
/// Deletes all controls from the collection.
///
///
public void Clear() {
if (owner.HasControls())
owner.Controls.Clear();
}
///
/// [To be supplied.]
///
public void CopyTo(Array array, int index) {
for (IEnumerator e = this.GetEnumerator(); e.MoveNext();)
array.SetValue(e.Current, index++);
}
///
///
public Object SyncRoot {
get { return this;}
}
///
///
public bool IsReadOnly {
get { return false;}
}
///
///
public bool IsSynchronized {
get { return false;}
}
///
///
public IEnumerator GetEnumerator() {
return owner.Controls.GetEnumerator();
}
///
///
/// Deletes the specified
/// control
/// from the collection.
///
///
public void Remove(HtmlTableRow row) {
owner.Controls.Remove(row);
}
///
///
/// Deletes the control at the specified index
/// location from the collection.
///
///
public void RemoveAt(int index) {
owner.Controls.RemoveAt(index);
}
}
}
// 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
- RightsManagementEncryptedStream.cs
- CodeSnippetCompileUnit.cs
- SortedDictionary.cs
- WindowsFont.cs
- RuntimeConfig.cs
- LinqDataSourceView.cs
- RowVisual.cs
- IisTraceWebEventProvider.cs
- AccessDataSource.cs
- ByteAnimation.cs
- TextBoxAutomationPeer.cs
- Helpers.cs
- StringBuilder.cs
- Msec.cs
- DataErrorValidationRule.cs
- InfoCardSymmetricCrypto.cs
- WebControlAdapter.cs
- ThumbAutomationPeer.cs
- ETagAttribute.cs
- SimpleParser.cs
- SchemaNotation.cs
- XmlSchemaSubstitutionGroup.cs
- VersionedStreamOwner.cs
- ChangeBlockUndoRecord.cs
- ByeMessage11.cs
- RepeaterDataBoundAdapter.cs
- EncoderBestFitFallback.cs
- MultiPropertyDescriptorGridEntry.cs
- AppDomain.cs
- RequestStatusBarUpdateEventArgs.cs
- DependencyPropertyChangedEventArgs.cs
- WorkflowTransactionService.cs
- EventLogReader.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- SkinIDTypeConverter.cs
- SubMenuStyle.cs
- TypefaceMetricsCache.cs
- ReadOnlyHierarchicalDataSourceView.cs
- TimerElapsedEvenArgs.cs
- SqlDataReader.cs
- DataExchangeServiceBinder.cs
- TypedElement.cs
- SafePEFileHandle.cs
- DashStyle.cs
- RegistryKey.cs
- SmtpLoginAuthenticationModule.cs
- TextFindEngine.cs
- FunctionDescription.cs
- SqlXml.cs
- SettingsPropertyIsReadOnlyException.cs
- Socket.cs
- HttpDebugHandler.cs
- DocumentProperties.cs
- SpeechRecognizer.cs
- cookiecollection.cs
- ScrollViewerAutomationPeer.cs
- RayMeshGeometry3DHitTestResult.cs
- IndexedString.cs
- DesignerVerbCollection.cs
- EventTrigger.cs
- StreamWithDictionary.cs
- SortFieldComparer.cs
- BinaryFormatterWriter.cs
- Viewport3DAutomationPeer.cs
- ExpressionPrefixAttribute.cs
- WhiteSpaceTrimStringConverter.cs
- CustomAttributeBuilder.cs
- PointF.cs
- ExtensionDataObject.cs
- HashJoinQueryOperatorEnumerator.cs
- GPRECTF.cs
- DbProviderServices.cs
- ControlDesigner.cs
- ContextMenu.cs
- DSACryptoServiceProvider.cs
- ClassHandlersStore.cs
- FileSystemWatcher.cs
- BidOverLoads.cs
- SchemaImporterExtensionElement.cs
- ExpandedWrapper.cs
- DefaultPrintController.cs
- XmlElementAttributes.cs
- Vector.cs
- DelegatingConfigHost.cs
- ArglessEventHandlerProxy.cs
- BitSet.cs
- SoapElementAttribute.cs
- OpCellTreeNode.cs
- MultipartContentParser.cs
- EdgeProfileValidation.cs
- ExcludePathInfo.cs
- DescendentsWalkerBase.cs
- ComponentManagerBroker.cs
- SolidColorBrush.cs
- ParentQuery.cs
- IDispatchConstantAttribute.cs
- SBCSCodePageEncoding.cs
- DesignerOptionService.cs
- AnonymousIdentificationModule.cs
- EntityClassGenerator.cs