Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / WebControls / DataControlFieldHeaderCell.cs / 1 / DataControlFieldHeaderCell.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.WebControls {
using System;
using System.Globalization;
using System.Security.Permissions;
///
/// Creates a special header cell that is contained within a DataControlField.
///
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public class DataControlFieldHeaderCell : DataControlFieldCell {
public DataControlFieldHeaderCell(DataControlField containingField) : base(HtmlTextWriterTag.Th, containingField) {
}
///
///
/// Sets the abbreviated text for a header cell. The abbreviated text
/// is rendered with the HTML ABBR attribute. The ABBR attribute is important
/// for screen readers since it allows them to read a shortened version of a header for each cell in the table.
///
///
public virtual string AbbreviatedText {
get {
object x = ViewState["AbbrText"];
return((x == null) ? String.Empty : (string)x);
}
set {
ViewState["AbbrText"] = value;
}
}
///
///
/// Represents the cells that the header applies to. Renders the HTML scope attribute. Possible values are from the TableHeaderScope enumeration: Column and Row.
///
///
public virtual TableHeaderScope Scope {
get {
object x = ViewState["Scope"];
return((x == null) ? TableHeaderScope.NotSet : (TableHeaderScope)x);
}
set {
ViewState["Scope"] = value;
}
}
///
/// Adds header cell attributes to the list of attributes to render.
///
protected override void AddAttributesToRender(HtmlTextWriter writer) {
base.AddAttributesToRender(writer);
TableHeaderScope scope = Scope;
if (scope != TableHeaderScope.NotSet) {
if (scope == TableHeaderScope.Column) {
writer.AddAttribute(HtmlTextWriterAttribute.Scope, "col");
}
else {
writer.AddAttribute(HtmlTextWriterAttribute.Scope, "row");
}
}
String abbr = AbbreviatedText;
if (!String.IsNullOrEmpty(abbr)) {
writer.AddAttribute(HtmlTextWriterAttribute.Abbr, abbr);
}
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ListViewItemSelectionChangedEvent.cs
- IntSecurity.cs
- WebPartAddingEventArgs.cs
- DataGridViewAccessibleObject.cs
- WorkflowTransactionService.cs
- XmlSchemaAttribute.cs
- LogConverter.cs
- XmlILConstructAnalyzer.cs
- PathFigure.cs
- HtmlCommandAdapter.cs
- ToolStripComboBox.cs
- WorkflowWebHostingModule.cs
- EUCJPEncoding.cs
- EnumerableValidator.cs
- Helpers.cs
- GPStream.cs
- ApplicationFileParser.cs
- State.cs
- HttpRequestTraceRecord.cs
- ParserStreamGeometryContext.cs
- oledbmetadatacollectionnames.cs
- DynamicQueryableWrapper.cs
- SafePipeHandle.cs
- FontFamilyConverter.cs
- RelationshipEndMember.cs
- DesignerVerbToolStripMenuItem.cs
- CalendarDataBindingHandler.cs
- DiscreteKeyFrames.cs
- XmlCompatibilityReader.cs
- TargetInvocationException.cs
- WindowClosedEventArgs.cs
- FunctionImportMapping.cs
- EventMap.cs
- ArraySegment.cs
- SHA512Managed.cs
- BitVector32.cs
- DataObject.cs
- StateMachineDesignerPaint.cs
- PathFigureCollectionConverter.cs
- DbQueryCommandTree.cs
- AssertSection.cs
- DispatcherObject.cs
- DesignConnectionCollection.cs
- ToolStripItemClickedEventArgs.cs
- ToolboxItemCollection.cs
- Section.cs
- Command.cs
- JoinTreeSlot.cs
- MergeFilterQuery.cs
- EntityDataSourceQueryBuilder.cs
- ToolboxItemCollection.cs
- SystemMulticastIPAddressInformation.cs
- Win32.cs
- SHA256.cs
- KernelTypeValidation.cs
- JournalNavigationScope.cs
- SqlDataSourceView.cs
- HelpInfo.cs
- ValidationSummaryDesigner.cs
- TrustLevel.cs
- VerticalAlignConverter.cs
- TypeCollectionDesigner.xaml.cs
- LinkConverter.cs
- UnsafeNetInfoNativeMethods.cs
- RequestCachePolicy.cs
- InstanceLockQueryResult.cs
- OracleParameter.cs
- Column.cs
- LocalBuilder.cs
- RegexReplacement.cs
- WebEncodingValidatorAttribute.cs
- Encoding.cs
- LinkTarget.cs
- Tablet.cs
- SHA512.cs
- HebrewCalendar.cs
- TransactionFilter.cs
- WebServiceMethodData.cs
- AuthenticationModulesSection.cs
- XmlReflectionImporter.cs
- RealizationContext.cs
- ToolStripItemRenderEventArgs.cs
- unitconverter.cs
- ConnectionStringsSection.cs
- TemplateControlParser.cs
- ButtonFlatAdapter.cs
- EtwTrace.cs
- CodeAttributeArgument.cs
- XmlnsDictionary.cs
- ColorConvertedBitmapExtension.cs
- TableItemPattern.cs
- DataRecordInternal.cs
- ChineseLunisolarCalendar.cs
- InvalidFilterCriteriaException.cs
- CodeAttributeDeclaration.cs
- DateTimeHelper.cs
- TextTreePropertyUndoUnit.cs
- DetailsViewUpdatedEventArgs.cs
- MsmqInputChannelBase.cs
- RadioButtonRenderer.cs