Code:
/ DotNET / DotNET / 8.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
- TraceContext.cs
- TriState.cs
- DispatchChannelSink.cs
- StopStoryboard.cs
- HyperLinkField.cs
- ObjectIDGenerator.cs
- InvokeAction.cs
- EntityDataSourceChangingEventArgs.cs
- RemoteHelper.cs
- PrinterUnitConvert.cs
- TextEffectCollection.cs
- FixedDocument.cs
- DefaultShape.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- SettingsAttributes.cs
- AxisAngleRotation3D.cs
- DiscriminatorMap.cs
- CodeNamespace.cs
- PkcsUtils.cs
- WebBrowserProgressChangedEventHandler.cs
- DetailsViewRow.cs
- SqlWorkflowPersistenceService.cs
- FunctionParameter.cs
- SelectionItemPatternIdentifiers.cs
- OrCondition.cs
- NoPersistProperty.cs
- Clipboard.cs
- SimpleMailWebEventProvider.cs
- HttpProfileBase.cs
- GenericUriParser.cs
- CompilerTypeWithParams.cs
- ObjectStateManagerMetadata.cs
- PerfCounters.cs
- StyleHelper.cs
- ObfuscationAttribute.cs
- MenuScrollingVisibilityConverter.cs
- TrackingLocation.cs
- RuleSetCollection.cs
- CodeMemberField.cs
- DesignerDataRelationship.cs
- WebPartMenu.cs
- DataViewManager.cs
- ContextQuery.cs
- Point4D.cs
- KeyProperty.cs
- WebRequestModulesSection.cs
- AppSettingsExpressionBuilder.cs
- PropertyGridView.cs
- StringCollection.cs
- ToolStripDropDown.cs
- WebControl.cs
- TaiwanLunisolarCalendar.cs
- InlineCollection.cs
- ComboBox.cs
- XmlBinaryReader.cs
- PropertyEmitterBase.cs
- WaitHandle.cs
- ZipIOCentralDirectoryFileHeader.cs
- RSAOAEPKeyExchangeDeformatter.cs
- TypedDataSetSchemaImporterExtensionFx35.cs
- ScriptControl.cs
- XamlVector3DCollectionSerializer.cs
- CachedCompositeFamily.cs
- PersonalizationProviderHelper.cs
- CreateUserWizardStep.cs
- AnimatedTypeHelpers.cs
- DeclaredTypeValidatorAttribute.cs
- ListViewItemEventArgs.cs
- DataGridViewSelectedCellCollection.cs
- ItemTypeToolStripMenuItem.cs
- OwnerDrawPropertyBag.cs
- SafeCloseHandleCritical.cs
- documentsequencetextcontainer.cs
- SqlFormatter.cs
- EntityDataSourceDesignerHelper.cs
- StreamWriter.cs
- SpeakInfo.cs
- CircleHotSpot.cs
- ImportCatalogPart.cs
- HashSetDebugView.cs
- FileRegion.cs
- UserControl.cs
- WindowsFormsSynchronizationContext.cs
- SecurityChannelFaultConverter.cs
- _OverlappedAsyncResult.cs
- ReadOnlyTernaryTree.cs
- OracleTimeSpan.cs
- PolyQuadraticBezierSegment.cs
- ActivationWorker.cs
- AdCreatedEventArgs.cs
- DSGeneratorProblem.cs
- _BufferOffsetSize.cs
- ClientTarget.cs
- NativeStructs.cs
- SqlInternalConnectionTds.cs
- TypeLoadException.cs
- IconConverter.cs
- LiteralTextParser.cs
- ResourceExpressionBuilder.cs
- _SecureChannel.cs