Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebControls / FormViewRow.cs / 1305376 / FormViewRow.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.WebControls {
using System;
using System.ComponentModel;
///
/// Represents an individual row in the .
///
public class FormViewRow : TableRow {
private int _itemIndex;
private DataControlRowType _rowType;
private DataControlRowState _rowState;
///
/// Initializes a new instance of the class.
///
public FormViewRow(int itemIndex, DataControlRowType rowType, DataControlRowState rowState) {
this._itemIndex = itemIndex;
this._rowType = rowType;
this._rowState = rowState;
RenderTemplateContainer = true;
}
///
/// Indicates the index of the item in the . This property is
/// read-only.
///
public virtual int ItemIndex {
get {
return _itemIndex;
}
}
///
/// Indicates the type of the row in the .
///
public virtual DataControlRowState RowState {
get {
return _rowState;
}
}
///
/// Indicates the type of the row in the .
///
public virtual DataControlRowType RowType {
get {
return _rowType;
}
}
internal bool RenderTemplateContainer { get; set; }
protected internal override void Render(HtmlTextWriter writer) {
if (RenderTemplateContainer) {
//render the table row normally
base.Render(writer);
} else {
//render the contents of the cells
foreach (TableCell cell in Cells) {
cell.RenderContents(writer);
}
}
}
///
///
///
protected override bool OnBubbleEvent(object source, EventArgs e) {
if (e is CommandEventArgs) {
FormViewCommandEventArgs args = new FormViewCommandEventArgs(source, (CommandEventArgs)e);
RaiseBubbleEvent(this, args);
return true;
}
return false;
}
}
}
// 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;
using System.ComponentModel;
///
/// Represents an individual row in the .
///
public class FormViewRow : TableRow {
private int _itemIndex;
private DataControlRowType _rowType;
private DataControlRowState _rowState;
///
/// Initializes a new instance of the class.
///
public FormViewRow(int itemIndex, DataControlRowType rowType, DataControlRowState rowState) {
this._itemIndex = itemIndex;
this._rowType = rowType;
this._rowState = rowState;
RenderTemplateContainer = true;
}
///
/// Indicates the index of the item in the . This property is
/// read-only.
///
public virtual int ItemIndex {
get {
return _itemIndex;
}
}
///
/// Indicates the type of the row in the .
///
public virtual DataControlRowState RowState {
get {
return _rowState;
}
}
///
/// Indicates the type of the row in the .
///
public virtual DataControlRowType RowType {
get {
return _rowType;
}
}
internal bool RenderTemplateContainer { get; set; }
protected internal override void Render(HtmlTextWriter writer) {
if (RenderTemplateContainer) {
//render the table row normally
base.Render(writer);
} else {
//render the contents of the cells
foreach (TableCell cell in Cells) {
cell.RenderContents(writer);
}
}
}
///
///
///
protected override bool OnBubbleEvent(object source, EventArgs e) {
if (e is CommandEventArgs) {
FormViewCommandEventArgs args = new FormViewCommandEventArgs(source, (CommandEventArgs)e);
RaiseBubbleEvent(this, args);
return true;
}
return false;
}
}
}
// 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
- XmlSchemaImporter.cs
- NavigationCommands.cs
- IisTraceWebEventProvider.cs
- GridViewCancelEditEventArgs.cs
- Point3DCollection.cs
- CanonicalXml.cs
- CommandCollectionEditor.cs
- ControlCollection.cs
- RowToParametersTransformer.cs
- HtmlLabelAdapter.cs
- ApplicationInfo.cs
- ProjectedSlot.cs
- SkinBuilder.cs
- Base64Stream.cs
- XPathNodeHelper.cs
- DockEditor.cs
- FormConverter.cs
- XsdBuildProvider.cs
- Base64Decoder.cs
- RegexGroupCollection.cs
- EllipseGeometry.cs
- PerspectiveCamera.cs
- RowSpanVector.cs
- WsdlInspector.cs
- SplineKeyFrames.cs
- MailHeaderInfo.cs
- CheckBoxBaseAdapter.cs
- QilVisitor.cs
- ConfigurationSectionCollection.cs
- Knowncolors.cs
- OpenTypeLayoutCache.cs
- GeometryDrawing.cs
- CodeDomSerializerBase.cs
- CoreSwitches.cs
- OleDbErrorCollection.cs
- HttpChannelListener.cs
- CompilerResults.cs
- DynamicResourceExtensionConverter.cs
- TemplateControl.cs
- EngineSite.cs
- PerfCounters.cs
- CalloutQueueItem.cs
- JoinQueryOperator.cs
- ObjectComplexPropertyMapping.cs
- SqlXml.cs
- SQLBytesStorage.cs
- SerializationEventsCache.cs
- AssociationTypeEmitter.cs
- DispatchWrapper.cs
- DataGridViewColumnHeaderCell.cs
- XmlILModule.cs
- UnsafeNativeMethods.cs
- SystemUdpStatistics.cs
- SimplePropertyEntry.cs
- MaterializeFromAtom.cs
- IPipelineRuntime.cs
- DataGridViewRowCollection.cs
- HandledMouseEvent.cs
- SpellerInterop.cs
- ComponentCollection.cs
- PrivateFontCollection.cs
- ObjectConverter.cs
- PathData.cs
- Errors.cs
- HebrewCalendar.cs
- MetadataUtilsSmi.cs
- ToolStripItemRenderEventArgs.cs
- WebScriptEnablingBehavior.cs
- SourceChangedEventArgs.cs
- CallId.cs
- DoubleAnimationUsingKeyFrames.cs
- BufferedWebEventProvider.cs
- XPathParser.cs
- HttpRequestTraceRecord.cs
- XmlCodeExporter.cs
- ButtonBaseAutomationPeer.cs
- Color.cs
- SHA1CryptoServiceProvider.cs
- WorkflowWebHostingModule.cs
- HttpCookie.cs
- RangeValuePattern.cs
- DuplexChannelBinder.cs
- DispatcherHookEventArgs.cs
- ISAPIApplicationHost.cs
- BrowserCapabilitiesFactory.cs
- RegionData.cs
- DataTemplate.cs
- BufferedGraphics.cs
- AssemblyBuilder.cs
- ILGen.cs
- FindRequestContext.cs
- TemplateColumn.cs
- SecurityContext.cs
- XmlSchemaFacet.cs
- FrugalMap.cs
- XamlFigureLengthSerializer.cs
- GuidelineCollection.cs
- Padding.cs
- EntityDataSourceValidationException.cs
- PlatformNotSupportedException.cs