Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewElement.cs / 1 / DataGridViewElement.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Windows.Forms { using System; using System.Drawing; using System.Diagnostics; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; ////// /// public class DataGridViewElement { private DataGridViewElementStates state; // enabled frozen readOnly resizable selected visible private DataGridView dataGridView; ///Identifies an element in the dataGridView (base class for TCell, TBand, TRow, TColumn. ////// /// public DataGridViewElement() { this.state = DataGridViewElementStates.Visible; } internal DataGridViewElement(DataGridViewElement dgveTemplate) { // Selected and Displayed states are not inherited this.state = dgveTemplate.State & (DataGridViewElementStates.Frozen | DataGridViewElementStates.ReadOnly | DataGridViewElementStates.Resizable | DataGridViewElementStates.ResizableSet | DataGridViewElementStates.Visible); } ////// Initializes a new instance of the ///class. /// [ Browsable(false), EditorBrowsable(EditorBrowsableState.Advanced) ] public virtual DataGridViewElementStates State { get { return this.state; } } internal DataGridViewElementStates StateInternal { set { this.state = value; } } internal bool StateIncludes(DataGridViewElementStates elementState) { return (this.State & elementState) == elementState; } internal bool StateExcludes(DataGridViewElementStates elementState) { return (this.State & elementState) == 0; } /// [ Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public DataGridView DataGridView { get { return this.dataGridView; } } internal DataGridView DataGridViewInternal { set { if (this.DataGridView != value) { this.dataGridView = value; OnDataGridViewChanged(); } } } /// protected virtual void OnDataGridViewChanged() { } /// [SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate")] // Method raises an event for the grid control protected void RaiseCellClick(DataGridViewCellEventArgs e) { if (this.dataGridView != null) { this.dataGridView.OnCellClickInternal(e); } } /// [SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate")] // Method raises an event for the grid control protected void RaiseCellContentClick(DataGridViewCellEventArgs e) { if (this.dataGridView != null) { this.dataGridView.OnCellContentClickInternal(e); } } /// [SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate")] // Method raises an event for the grid control protected void RaiseCellContentDoubleClick(DataGridViewCellEventArgs e) { if (this.dataGridView != null) { this.dataGridView.OnCellContentDoubleClickInternal(e); } } /// [SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate")] // Method raises an event for the grid control protected void RaiseCellValueChanged(DataGridViewCellEventArgs e) { if (this.dataGridView != null) { this.dataGridView.OnCellValueChangedInternal(e); } } /// [SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate")] // Method raises an event for the grid control protected void RaiseDataError(DataGridViewDataErrorEventArgs e) { if (this.dataGridView != null) { this.dataGridView.OnDataErrorInternal(e); } } /// [SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate")] // Method raises an event for the grid control protected void RaiseMouseWheel(MouseEventArgs e) { if (this.dataGridView != null) { this.dataGridView.OnMouseWheelInternal(e); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DelegateBodyWriter.cs
- DelegatingTypeDescriptionProvider.cs
- FeedUtils.cs
- ImportCatalogPart.cs
- DocumentPage.cs
- NamespaceDisplay.xaml.cs
- ValueConversionAttribute.cs
- _ConnectStream.cs
- JsonByteArrayDataContract.cs
- SamlAuthenticationClaimResource.cs
- CmsInterop.cs
- DeferredElementTreeState.cs
- String.cs
- AdornerPresentationContext.cs
- Crc32.cs
- VisualState.cs
- LoginCancelEventArgs.cs
- HtmlTextArea.cs
- BitmapImage.cs
- AssemblyCollection.cs
- PagesChangedEventArgs.cs
- PropertyMappingExceptionEventArgs.cs
- NullableBoolConverter.cs
- CodeIndexerExpression.cs
- DesignerProperties.cs
- BitArray.cs
- ExecutorLocksHeldException.cs
- Directory.cs
- parserscommon.cs
- AppDomainFactory.cs
- MasterPageBuildProvider.cs
- LoginName.cs
- NetworkInformationPermission.cs
- Queue.cs
- SqlNodeAnnotation.cs
- FontStyleConverter.cs
- EntryPointNotFoundException.cs
- WindowHelperService.cs
- TagPrefixAttribute.cs
- ClientTargetSection.cs
- WebPartMovingEventArgs.cs
- SoundPlayer.cs
- Lease.cs
- BitmapEffectGeneralTransform.cs
- ReflectionPermission.cs
- SqlFactory.cs
- EntityDesignerDataSourceView.cs
- TextEffect.cs
- DataGridViewControlCollection.cs
- GroupBoxRenderer.cs
- BitmapPalettes.cs
- DocumentAutomationPeer.cs
- CodeBinaryOperatorExpression.cs
- SimpleBitVector32.cs
- MultiTrigger.cs
- BooleanStorage.cs
- MissingFieldException.cs
- AutomationIdentifier.cs
- RuntimeResourceSet.cs
- CharacterString.cs
- ToolBar.cs
- XmlRootAttribute.cs
- Vector3dCollection.cs
- WriterOutput.cs
- BitmapPalettes.cs
- ChannelServices.cs
- MatrixIndependentAnimationStorage.cs
- HostExecutionContextManager.cs
- GuidConverter.cs
- SystemGatewayIPAddressInformation.cs
- OrderedDictionaryStateHelper.cs
- TdsValueSetter.cs
- BindingExpressionUncommonField.cs
- AppPool.cs
- SoapMessage.cs
- ArgumentNullException.cs
- DataBoundControl.cs
- EmissiveMaterial.cs
- DataBindingExpressionBuilder.cs
- GlobalEventManager.cs
- WsatAdminException.cs
- IResourceProvider.cs
- CheckPair.cs
- ParserHooks.cs
- Trace.cs
- Msec.cs
- CompiledRegexRunnerFactory.cs
- DesignBindingPropertyDescriptor.cs
- SizeValueSerializer.cs
- ThreadExceptionEvent.cs
- IPAddress.cs
- FunctionCommandText.cs
- FillBehavior.cs
- DesignBindingPicker.cs
- XmlnsCompatibleWithAttribute.cs
- PeerTransportSecurityElement.cs
- LocalFileSettingsProvider.cs
- RuleSettings.cs
- IndexedEnumerable.cs
- DataGridViewTextBoxEditingControl.cs