Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewElement.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ExtensionQuery.cs
- ViewgenGatekeeper.cs
- DataContract.cs
- SecurityContext.cs
- AttributeCollection.cs
- FactoryGenerator.cs
- SqlComparer.cs
- PersistenceTypeAttribute.cs
- MimeMultiPart.cs
- SystemGatewayIPAddressInformation.cs
- DataGridCell.cs
- ToolStripSplitStackLayout.cs
- EventLogConfiguration.cs
- ArrangedElementCollection.cs
- ClientTarget.cs
- ConcurrencyMode.cs
- PaperSize.cs
- OleDbConnectionFactory.cs
- XmlHierarchicalDataSourceView.cs
- CompilationPass2Task.cs
- SelectionPattern.cs
- MdiWindowListItemConverter.cs
- HtmlString.cs
- PipeSecurity.cs
- StyleXamlTreeBuilder.cs
- Renderer.cs
- DrawingImage.cs
- DataGridViewCellPaintingEventArgs.cs
- BaseComponentEditor.cs
- SqlCacheDependency.cs
- milrender.cs
- CodeAssignStatement.cs
- DateBoldEvent.cs
- WmfPlaceableFileHeader.cs
- PublishLicense.cs
- iisPickupDirectory.cs
- TransactionOptions.cs
- SystemUdpStatistics.cs
- TextTrailingWordEllipsis.cs
- TemplateControl.cs
- InterleavedZipPartStream.cs
- WebHttpBehavior.cs
- DependencyObjectProvider.cs
- BufferedOutputStream.cs
- AddInControllerImpl.cs
- DesignerDataTableBase.cs
- Message.cs
- AmbientProperties.cs
- EmptyReadOnlyDictionaryInternal.cs
- _NativeSSPI.cs
- PathParser.cs
- CallbackBehaviorAttribute.cs
- IndexOutOfRangeException.cs
- IIS7WorkerRequest.cs
- SafeCryptContextHandle.cs
- DocumentStream.cs
- SizeF.cs
- TraceProvider.cs
- Set.cs
- FactoryGenerator.cs
- CmsInterop.cs
- DragEvent.cs
- ActivityExecutionContext.cs
- ProcessHostConfigUtils.cs
- RMPermissions.cs
- TimeIntervalCollection.cs
- URI.cs
- Iis7Helper.cs
- ObjectDataSourceWizardForm.cs
- DataBinder.cs
- DispatcherExceptionFilterEventArgs.cs
- ElementAction.cs
- StickyNote.cs
- TextEndOfSegment.cs
- PreservationFileWriter.cs
- SystemDropShadowChrome.cs
- ChangePasswordDesigner.cs
- ProgressBarHighlightConverter.cs
- HttpsChannelListener.cs
- PrimaryKeyTypeConverter.cs
- SqlTransaction.cs
- BuildResult.cs
- SystemUnicastIPAddressInformation.cs
- Rect.cs
- ProfilePropertySettingsCollection.cs
- HiddenFieldPageStatePersister.cs
- TriggerActionCollection.cs
- InvalidComObjectException.cs
- ControlParameter.cs
- WSDualHttpBindingElement.cs
- AuthorizationPolicyTypeElement.cs
- FixedSOMContainer.cs
- CodeExpressionCollection.cs
- EntityDesignerDataSourceView.cs
- RtfControlWordInfo.cs
- OracleConnection.cs
- ErrorInfoXmlDocument.cs
- PropertyPushdownHelper.cs
- Socket.cs
- OracleBinary.cs