Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / WebControls / DataGridLinkButton.cs / 2 / 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. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- VerticalAlignConverter.cs
- SqlCacheDependency.cs
- DefaultAuthorizationContext.cs
- MsmqVerifier.cs
- StoreAnnotationsMap.cs
- CalendarKeyboardHelper.cs
- FontFamilyConverter.cs
- XmlSchemaValidationException.cs
- XmlSchemaElement.cs
- PeerName.cs
- XmlEntityReference.cs
- ExpressionBinding.cs
- NegotiateStream.cs
- MatchNoneMessageFilter.cs
- DecimalAnimation.cs
- BasePropertyDescriptor.cs
- RadioButtonList.cs
- DataGridHeaderBorder.cs
- PropertyEmitter.cs
- BamlBinaryWriter.cs
- MultiAsyncResult.cs
- XmlUrlResolver.cs
- XmlTextEncoder.cs
- XmlWrappingWriter.cs
- SerializationSectionGroup.cs
- FileDialogPermission.cs
- UserControl.cs
- SessionIDManager.cs
- WebPartCatalogAddVerb.cs
- UnitControl.cs
- Pkcs7Recipient.cs
- LocatorManager.cs
- XmlChoiceIdentifierAttribute.cs
- AppDomain.cs
- TagNameToTypeMapper.cs
- HwndMouseInputProvider.cs
- Point3DCollection.cs
- DbUpdateCommandTree.cs
- DriveNotFoundException.cs
- OrderedDictionaryStateHelper.cs
- RelationshipFixer.cs
- MSAAEventDispatcher.cs
- GCHandleCookieTable.cs
- MorphHelper.cs
- SQLDoubleStorage.cs
- ComponentResourceKeyConverter.cs
- NativeMethods.cs
- BindingListCollectionView.cs
- UserPersonalizationStateInfo.cs
- MethodRental.cs
- AuthenticationException.cs
- SelectedPathEditor.cs
- NotFiniteNumberException.cs
- Boolean.cs
- ProcessModule.cs
- ServiceInfo.cs
- EnumerableCollectionView.cs
- ZoneIdentityPermission.cs
- PropertyEmitterBase.cs
- URLIdentityPermission.cs
- Inline.cs
- X509Certificate2.cs
- EmptyQuery.cs
- FormViewUpdatedEventArgs.cs
- ColumnCollection.cs
- TargetException.cs
- PageClientProxyGenerator.cs
- XamlStackWriter.cs
- TraceSection.cs
- SocketManager.cs
- RepeaterDataBoundAdapter.cs
- GiveFeedbackEventArgs.cs
- Base64Stream.cs
- HttpContext.cs
- DefaultTextStore.cs
- ControlValuePropertyAttribute.cs
- WebPartTransformer.cs
- RegisteredHiddenField.cs
- SqlBulkCopyColumnMappingCollection.cs
- MarkerProperties.cs
- SqlDataSourceParameterParser.cs
- HTTPNotFoundHandler.cs
- Marshal.cs
- Missing.cs
- FilterEventArgs.cs
- EdmProviderManifest.cs
- EntityDataSourceContextCreatedEventArgs.cs
- TableItemPattern.cs
- ContentHostHelper.cs
- VisualStyleRenderer.cs
- uribuilder.cs
- IFlowDocumentViewer.cs
- SiteOfOriginPart.cs
- BitmapCacheBrush.cs
- FontStyle.cs
- CredentialCache.cs
- AssertSection.cs
- X509Utils.cs
- UInt64.cs
- RuntimeConfigLKG.cs