Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebControls / DataGridLinkButton.cs / 1305376 / DataGridLinkButton.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls { using System; using System.Drawing; using System.Web.Util; ////// Derived version of LinkButton used within a DataGrid. /// [SupportsEventValidation] internal sealed class DataGridLinkButton : LinkButton { internal DataGridLinkButton() {} protected internal override void Render(HtmlTextWriter writer) { SetForeColor(); base.Render(writer); } ////// In HTML hyperlinks always use the browser's link color. /// For the DataGrid, we want all LinkButtons to honor the ForeColor setting. /// This requires looking up into the control hierarchy to see if either the cell /// or the containing row or table define a ForeColor. /// private void SetForeColor() { if (ControlStyle.IsSet(System.Web.UI.WebControls.Style.PROP_FORECOLOR) == false) { Color hyperLinkForeColor; Control control = this; for (int i = 0; i < 3; i++) { control = control.Parent; Debug.Assert(((i == 0) && (control is TableCell)) || ((i == 1) && (control is TableRow)) || ((i == 2) && (control is Table))); hyperLinkForeColor = ((WebControl)control).ForeColor; if (hyperLinkForeColor != Color.Empty) { ForeColor = hyperLinkForeColor; break; } } } } } } // 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
- ToolStripItemTextRenderEventArgs.cs
- TemplateBindingExpression.cs
- ToolboxItemWrapper.cs
- UIntPtr.cs
- MulticastDelegate.cs
- HTMLTextWriter.cs
- MetadataSource.cs
- KeyedHashAlgorithm.cs
- URLAttribute.cs
- SvcMapFileLoader.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- ACE.cs
- CompilerErrorCollection.cs
- EDesignUtil.cs
- RbTree.cs
- PreviewPageInfo.cs
- XmlBaseWriter.cs
- XmlNamespaceMappingCollection.cs
- PersianCalendar.cs
- TextEditorSelection.cs
- SmiEventSink_Default.cs
- ListBase.cs
- DataGridViewHitTestInfo.cs
- UsernameTokenFactoryCredential.cs
- MetadataItemEmitter.cs
- Style.cs
- TcpConnectionPool.cs
- milrender.cs
- Timeline.cs
- XmlDataLoader.cs
- EnumValAlphaComparer.cs
- GridEntryCollection.cs
- MouseActionConverter.cs
- ParserHooks.cs
- NumberAction.cs
- FrameworkContextData.cs
- Filter.cs
- MachineKeySection.cs
- ActivationWorker.cs
- EntityProviderFactory.cs
- VSWCFServiceContractGenerator.cs
- FastEncoderStatics.cs
- MaskedTextBox.cs
- HtmlInputReset.cs
- WinCategoryAttribute.cs
- DrawingGroup.cs
- Deflater.cs
- TextElement.cs
- XmlAttribute.cs
- FilterableAttribute.cs
- DataGridViewToolTip.cs
- XmlAttributeAttribute.cs
- TextElementEditingBehaviorAttribute.cs
- DataGridViewRowPrePaintEventArgs.cs
- SecurityDocument.cs
- CatalogZone.cs
- PropertySourceInfo.cs
- ValidationHelper.cs
- BordersPage.cs
- CompiledQuery.cs
- ZoneIdentityPermission.cs
- PageFunction.cs
- CultureMapper.cs
- CommonProperties.cs
- TemplateControlParser.cs
- ControlBindingsConverter.cs
- DesignSurfaceEvent.cs
- EntitySqlQueryCacheEntry.cs
- Table.cs
- Semaphore.cs
- DescendantQuery.cs
- LambdaCompiler.Unary.cs
- Ipv6Element.cs
- processwaithandle.cs
- SafeFileMappingHandle.cs
- Exceptions.cs
- activationcontext.cs
- ArrayList.cs
- WsatConfiguration.cs
- TextPointerBase.cs
- assertwrapper.cs
- TextEditorMouse.cs
- indexingfiltermarshaler.cs
- XmlEntityReference.cs
- ScrollEventArgs.cs
- CssClassPropertyAttribute.cs
- JoinTreeSlot.cs
- SerializerProvider.cs
- Preprocessor.cs
- ClientSideProviderDescription.cs
- DataIdProcessor.cs
- SelectionRange.cs
- XmlSchemaAnyAttribute.cs
- HitTestParameters3D.cs
- GcSettings.cs
- MyContact.cs
- TextMetrics.cs
- UrlAuthFailedErrorFormatter.cs
- ComAdminWrapper.cs
- Misc.cs