Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / WebControls / TableRow.cs / 2 / TableRow.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls { using System; using System.Collections; using System.ComponentModel; using System.ComponentModel.Design; using System.Globalization; using System.Web; using System.Web.UI; using System.Security.Permissions; ////// [ Bindable(false), DefaultProperty("Cells"), ParseChildren(true, "Cells"), ToolboxItem(false) ] [Designer("System.Web.UI.Design.WebControls.PreviewControlDesigner, " + AssemblyRef.SystemDesign)] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class TableRow : WebControl { TableCellCollection cells; ///Encapsulates a row /// within a table. ////// public TableRow() : base(HtmlTextWriterTag.Tr) { PreventAutoID(); } ////// Initializes a new instance of the ///class. /// /// [ MergableProperty(false), WebSysDescription(SR.TableRow_Cells), PersistenceMode(PersistenceMode.InnerDefaultProperty) ] public virtual TableCellCollection Cells { get { if (cells == null) cells = new TableCellCollection(this); return cells; } } ///Indicates the table cell collection of the table /// row. This property is read-only. ////// [ WebCategory("Layout"), DefaultValue(HorizontalAlign.NotSet), WebSysDescription(SR.TableItem_HorizontalAlign) ] public virtual HorizontalAlign HorizontalAlign { get { if (ControlStyleCreated == false) { return HorizontalAlign.NotSet; } return ((TableItemStyle)ControlStyle).HorizontalAlign; } set { ((TableItemStyle)ControlStyle).HorizontalAlign = value; } } [ WebCategory("Accessibility"), DefaultValue(TableRowSection.TableBody), WebSysDescription(SR.TableRow_TableSection) ] public virtual TableRowSection TableSection { get { object o = ViewState["TableSection"]; return((o == null) ? TableRowSection.TableBody : (TableRowSection)o); } set { if (value < TableRowSection.TableHeader || value > TableRowSection.TableFooter) { throw new ArgumentOutOfRangeException("value"); } ViewState["TableSection"] = value; if (value != TableRowSection.TableBody) { Control parent = Parent; if (parent != null) { Table parentTable = parent as Table; if (parentTable != null) { parentTable.HasRowSections = true; } } } } } ///Indicates the horizontal alignment of the content within the table cells. ////// [ WebCategory("Layout"), DefaultValue(VerticalAlign.NotSet), WebSysDescription(SR.TableItem_VerticalAlign) ] public virtual VerticalAlign VerticalAlign { get { if (ControlStyleCreated == false) { return VerticalAlign.NotSet; } return ((TableItemStyle)ControlStyle).VerticalAlign; } set { ((TableItemStyle)ControlStyle).VerticalAlign = value; } } ///Indicates the vertical alignment of the content within the cell. ////// /// protected override Style CreateControlStyle() { return new TableItemStyle(ViewState); } ///A protected method. Creates a table item control style. ////// protected override ControlCollection CreateControlCollection() { return new CellControlCollection(this); } ///[To be supplied.] ////// protected class CellControlCollection : ControlCollection { internal CellControlCollection (Control owner) : base(owner) { } ///[To be supplied.] ////// public override void Add(Control child) { if (child is TableCell) base.Add(child); else throw new ArgumentException(SR.GetString(SR.Cannot_Have_Children_Of_Type, "TableRow", child.GetType().Name.ToString(CultureInfo.InvariantCulture))); // throw an exception here } ///Adds the specified ///object to the collection. The new control is added /// to the end of the array. /// public override void AddAt(int index, Control child) { if (child is TableCell) base.AddAt(index, child); else throw new ArgumentException(SR.GetString(SR.Cannot_Have_Children_Of_Type, "TableRow", child.GetType().Name.ToString(CultureInfo.InvariantCulture))); // throw an exception here } } // class CellControlCollection } }Adds the specified ///object to the collection. The new control is added /// to the array at the specified index location.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- QueryRelOp.cs
- DataGridViewCheckBoxColumn.cs
- QueryExecutionOption.cs
- ViewStateException.cs
- AliasExpr.cs
- PropertyCondition.cs
- RelationshipEndMember.cs
- MSAAEventDispatcher.cs
- SqlParameterizer.cs
- _ListenerRequestStream.cs
- SafePEFileHandle.cs
- FreezableCollection.cs
- UIElementParaClient.cs
- ExternalFile.cs
- RowToParametersTransformer.cs
- PersonalizableTypeEntry.cs
- PieceNameHelper.cs
- SqlPersonalizationProvider.cs
- _NetworkingPerfCounters.cs
- RoutingExtension.cs
- EntityWrapperFactory.cs
- TriggerAction.cs
- FileCodeGroup.cs
- InternalConfigHost.cs
- Message.cs
- TickBar.cs
- CreateUserErrorEventArgs.cs
- KnownTypeDataContractResolver.cs
- Html32TextWriter.cs
- ClientFormsAuthenticationCredentials.cs
- HtmlInputButton.cs
- DefaultMemberAttribute.cs
- Context.cs
- XPathNode.cs
- EntityCommandCompilationException.cs
- versioninfo.cs
- UserUseLicenseDictionaryLoader.cs
- BitmapMetadataBlob.cs
- DataGridViewTopRowAccessibleObject.cs
- WpfMemberInvoker.cs
- SendingRequestEventArgs.cs
- DateTimeFormatInfo.cs
- DesignOnlyAttribute.cs
- GridViewCellAutomationPeer.cs
- RelationshipConverter.cs
- PersonalizationProviderCollection.cs
- ProviderUtil.cs
- RuntimeWrappedException.cs
- CoreChannel.cs
- Hyperlink.cs
- IsolatedStorage.cs
- HitTestWithGeometryDrawingContextWalker.cs
- ActiveDocumentEvent.cs
- UriSection.cs
- _FtpControlStream.cs
- ZipIOExtraFieldZip64Element.cs
- SymmetricSecurityProtocol.cs
- Schema.cs
- WorkflowInstanceAbortedRecord.cs
- HttpConfigurationContext.cs
- DataGridViewCellParsingEventArgs.cs
- SqlCommandBuilder.cs
- SimpleApplicationHost.cs
- UnicodeEncoding.cs
- SendKeys.cs
- WebResponse.cs
- SqlUdtInfo.cs
- Delegate.cs
- Validator.cs
- WebDescriptionAttribute.cs
- RowsCopiedEventArgs.cs
- AuthenticationException.cs
- LogEntrySerializer.cs
- SqlDesignerDataSourceView.cs
- _OSSOCK.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- XmlSchemaComplexContentExtension.cs
- QueryResultOp.cs
- FileUpload.cs
- XmlDesignerDataSourceView.cs
- ProviderException.cs
- RangeBase.cs
- WebPartConnection.cs
- OleDbPermission.cs
- LoadedOrUnloadedOperation.cs
- OdbcPermission.cs
- BindingValueChangedEventArgs.cs
- XmlDataSource.cs
- TypedDataSourceCodeGenerator.cs
- ObjectDataSourceMethodEventArgs.cs
- ContentValidator.cs
- TextSpan.cs
- GZipStream.cs
- XmlSchemaChoice.cs
- StringCollection.cs
- Configuration.cs
- Compiler.cs
- DataGridViewUtilities.cs
- EnvelopedPkcs7.cs
- DataListGeneralPage.cs