Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / WebControls / DataGridLinkButton.cs / 1 / 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; } } } } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ObjectStorage.cs
- UIElement3D.cs
- DesignerAttribute.cs
- ParameterBuilder.cs
- DBSchemaTable.cs
- DetailsViewRow.cs
- EventBuilder.cs
- TextEditorSelection.cs
- StatusBarPanelClickEvent.cs
- NetworkCredential.cs
- PrePrepareMethodAttribute.cs
- LexicalChunk.cs
- PropertyToken.cs
- SqlTriggerAttribute.cs
- PenThreadPool.cs
- QfeChecker.cs
- NamedPipeActivation.cs
- RemotingException.cs
- CustomDictionarySources.cs
- ApplicationGesture.cs
- WhiteSpaceTrimStringConverter.cs
- XmlSchemaException.cs
- FamilyCollection.cs
- PointAnimation.cs
- ColumnResult.cs
- ImportContext.cs
- SimpleType.cs
- XmlDocumentSchema.cs
- ContractSearchPattern.cs
- IIS7WorkerRequest.cs
- ToolstripProfessionalRenderer.cs
- DesignerActionPropertyItem.cs
- Container.cs
- LogLogRecord.cs
- MethodAccessException.cs
- AmbientValueAttribute.cs
- ActiveXSite.cs
- HtmlFormParameterWriter.cs
- Item.cs
- XmlComplianceUtil.cs
- Ray3DHitTestResult.cs
- UnmanagedMemoryStreamWrapper.cs
- WebHttpSecurity.cs
- HttpPostedFileBase.cs
- XmlUtilWriter.cs
- DataGrid.cs
- CharEntityEncoderFallback.cs
- BookmarkNameHelper.cs
- ListSourceHelper.cs
- EventProviderWriter.cs
- HtmlCommandAdapter.cs
- EditorZone.cs
- MouseCaptureWithinProperty.cs
- TempEnvironment.cs
- _NegoStream.cs
- SqlCacheDependency.cs
- OleDbCommand.cs
- InputScopeConverter.cs
- OrderedDictionary.cs
- LabelEditEvent.cs
- ThicknessAnimationUsingKeyFrames.cs
- DoubleIndependentAnimationStorage.cs
- NativeMethods.cs
- ProcessProtocolHandler.cs
- BindingExpressionBase.cs
- MetadataItemCollectionFactory.cs
- FrameSecurityDescriptor.cs
- Native.cs
- FontDifferentiator.cs
- EventLogLink.cs
- SafeNativeMethodsOther.cs
- XmlElementAttribute.cs
- IChannel.cs
- Array.cs
- BoundsDrawingContextWalker.cs
- TextDecorationCollection.cs
- XmlEncodedRawTextWriter.cs
- TextureBrush.cs
- Switch.cs
- ActionFrame.cs
- FamilyMap.cs
- GridViewEditEventArgs.cs
- LogLogRecord.cs
- PopupEventArgs.cs
- CultureTableRecord.cs
- AutoResizedEvent.cs
- safesecurityhelperavalon.cs
- Renderer.cs
- HostingEnvironmentWrapper.cs
- UnsafeNativeMethods.cs
- HtmlTableRow.cs
- RightNameExpirationInfoPair.cs
- MonthChangedEventArgs.cs
- ConfigXmlElement.cs
- ConfigurationSettings.cs
- IntSecurity.cs
- TreeBuilderBamlTranslator.cs
- TextDecorationLocationValidation.cs
- CustomValidator.cs
- IgnoreSectionHandler.cs