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
- HyperLinkColumn.cs
- MembershipUser.cs
- ConfigXmlText.cs
- TokenFactoryCredential.cs
- CodeVariableReferenceExpression.cs
- FileLoadException.cs
- Pkcs9Attribute.cs
- Converter.cs
- RangeValidator.cs
- UndoEngine.cs
- EventData.cs
- CreateUserWizardAutoFormat.cs
- ClientApiGenerator.cs
- ManipulationStartingEventArgs.cs
- GlyphTypeface.cs
- CryptoApi.cs
- PropertyDescriptor.cs
- As.cs
- RootAction.cs
- CatalogPartCollection.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- ToolStripItemEventArgs.cs
- WsatAdminException.cs
- ProjectedSlot.cs
- X509AsymmetricSecurityKey.cs
- dbenumerator.cs
- CollectionMarkupSerializer.cs
- KeyboardEventArgs.cs
- Underline.cs
- MessageQueueKey.cs
- SafeNativeMethods.cs
- XD.cs
- SourceLineInfo.cs
- DeclaredTypeElementCollection.cs
- ConnectionPointGlyph.cs
- SendOperation.cs
- LexicalChunk.cs
- __TransparentProxy.cs
- GeneratedView.cs
- IdentitySection.cs
- CompilationAssemblyInstallComponent.cs
- DataQuery.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- PortCache.cs
- OpenTypeLayout.cs
- CacheForPrimitiveTypes.cs
- DataGridViewControlCollection.cs
- activationcontext.cs
- Int64Converter.cs
- DataStorage.cs
- WindowsPrincipal.cs
- EventHandlersStore.cs
- CommandArguments.cs
- CrossContextChannel.cs
- UriSection.cs
- TextLineResult.cs
- Component.cs
- InvokeGenerator.cs
- SettingsAttributeDictionary.cs
- TextWriterEngine.cs
- PropertyEmitter.cs
- EllipseGeometry.cs
- WindowsComboBox.cs
- ObjectListDataBindEventArgs.cs
- TemplateField.cs
- PrintEvent.cs
- LayoutEvent.cs
- ListComponentEditorPage.cs
- DeflateStreamAsyncResult.cs
- ApplicationHost.cs
- RegistryPermission.cs
- ScrollItemPattern.cs
- CodeNamespaceImport.cs
- TriState.cs
- Logging.cs
- Exception.cs
- MethodSet.cs
- XmlArrayAttribute.cs
- Journal.cs
- BitmapEffectRenderDataResource.cs
- PriorityQueue.cs
- RtfToXamlLexer.cs
- Win32.cs
- ModelTreeManager.cs
- TextEndOfLine.cs
- DbProviderFactoriesConfigurationHandler.cs
- RadioButton.cs
- LineBreak.cs
- LinkUtilities.cs
- IMembershipProvider.cs
- HandlerWithFactory.cs
- XmlDsigSep2000.cs
- NativeWindow.cs
- ViewKeyConstraint.cs
- EpmCustomContentSerializer.cs
- ElementNotAvailableException.cs
- ExceptionUtil.cs
- TypeContext.cs
- EventSinkActivityDesigner.cs
- ConstraintCollection.cs