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 / WebControls / LayoutTable.cs / 1 / LayoutTable.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.WebControls {
using System.Collections;
using System.Security.Permissions;
using System.Web;
///
/// Table used for laying out controls in a Render method. Doesn't parent added controls, so
/// it is safe to add child controls to this table. Sets page of added controls if not already set.
///
[SupportsEventValidation]
internal sealed class LayoutTable : Table {
public LayoutTable(int rows, int columns, Page page) {
if (rows <= 0) {
throw new ArgumentOutOfRangeException("rows");
}
if (columns <= 0) {
throw new ArgumentOutOfRangeException("columns");
}
// page may be null in the designer
if (page != null) {
this.Page = page;
}
for (int r = 0; r < rows; r++) {
TableRow row = new TableRow();
Rows.Add(row);
for (int c = 0; c < columns; c++) {
TableCell cell = new LayoutTableCell();
row.Cells.Add(cell);
}
}
}
public TableCell this[int row, int column] {
get {
return (TableCell)Rows[row].Cells[column];
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.WebControls {
using System.Collections;
using System.Security.Permissions;
using System.Web;
///
/// Table used for laying out controls in a Render method. Doesn't parent added controls, so
/// it is safe to add child controls to this table. Sets page of added controls if not already set.
///
[SupportsEventValidation]
internal sealed class LayoutTable : Table {
public LayoutTable(int rows, int columns, Page page) {
if (rows <= 0) {
throw new ArgumentOutOfRangeException("rows");
}
if (columns <= 0) {
throw new ArgumentOutOfRangeException("columns");
}
// page may be null in the designer
if (page != null) {
this.Page = page;
}
for (int r = 0; r < rows; r++) {
TableRow row = new TableRow();
Rows.Add(row);
for (int c = 0; c < columns; c++) {
TableCell cell = new LayoutTableCell();
row.Cells.Add(cell);
}
}
}
public TableCell this[int row, int column] {
get {
return (TableCell)Rows[row].Cells[column];
}
}
}
}
// 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
- TransformedBitmap.cs
- WebBrowserBase.cs
- OptimizedTemplateContentHelper.cs
- MarkupProperty.cs
- ScanQueryOperator.cs
- MostlySingletonList.cs
- PasswordTextNavigator.cs
- ControlPaint.cs
- FlowDocumentFormatter.cs
- ReturnType.cs
- DiscoveryClientProtocol.cs
- ToolStripComboBox.cs
- TemplatedAdorner.cs
- CustomLineCap.cs
- AnchorEditor.cs
- WebDisplayNameAttribute.cs
- SchemaCollectionCompiler.cs
- GridViewPageEventArgs.cs
- FormsAuthenticationTicket.cs
- hresults.cs
- XmlAtomicValue.cs
- CaseInsensitiveOrdinalStringComparer.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- prefixendpointaddressmessagefilter.cs
- BlurBitmapEffect.cs
- ViewDesigner.cs
- ActiveXHelper.cs
- TraceRecords.cs
- KeyTime.cs
- GlyphingCache.cs
- GacUtil.cs
- DrawingBrush.cs
- NullToBooleanConverter.cs
- EventRoute.cs
- ImageKeyConverter.cs
- OneOfConst.cs
- ObjectStateManagerMetadata.cs
- HtmlDocument.cs
- RubberbandSelector.cs
- BooleanFacetDescriptionElement.cs
- DocumentApplicationJournalEntryEventArgs.cs
- IDQuery.cs
- MarkupCompiler.cs
- ColumnHeader.cs
- DependencyObjectPropertyDescriptor.cs
- ServerReliableChannelBinder.cs
- PathSegment.cs
- DirectionalLight.cs
- ComboBoxRenderer.cs
- BrowsableAttribute.cs
- AssemblyBuilderData.cs
- UIElement3D.cs
- MouseOverProperty.cs
- ThicknessKeyFrameCollection.cs
- odbcmetadatacollectionnames.cs
- PropertyNames.cs
- PagerSettings.cs
- RuleRefElement.cs
- UniqueConstraint.cs
- ContainerFilterService.cs
- InfoCardUIAgent.cs
- TextSyndicationContentKindHelper.cs
- ListViewContainer.cs
- WmlLabelAdapter.cs
- StringPropertyBuilder.cs
- Matrix.cs
- ByteStorage.cs
- PrimaryKeyTypeConverter.cs
- DataListItem.cs
- ContainerParaClient.cs
- ViewgenGatekeeper.cs
- PropVariant.cs
- StylusLogic.cs
- GridViewRowCollection.cs
- FunctionCommandText.cs
- HttpResponseWrapper.cs
- Utils.cs
- CommonObjectSecurity.cs
- ThicknessKeyFrameCollection.cs
- WebPartManagerInternals.cs
- SafeEventLogWriteHandle.cs
- SecurityTokenSerializer.cs
- Model3D.cs
- StandardToolWindows.cs
- XPathNodeList.cs
- SurrogateEncoder.cs
- typedescriptorpermission.cs
- DataGridViewRowsAddedEventArgs.cs
- DurableInstanceManager.cs
- TableItemPattern.cs
- SafeViewOfFileHandle.cs
- SecurityIdentifierElement.cs
- SqlFileStream.cs
- NetSectionGroup.cs
- WebPartCloseVerb.cs
- OneOf.cs
- SafeCryptoHandles.cs
- CellParagraph.cs
- DataPagerFieldCommandEventArgs.cs