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
- HttpHandlerAction.cs
- StringFunctions.cs
- ProfileParameter.cs
- FileRecordSequenceHelper.cs
- TdsParameterSetter.cs
- PeerEndPoint.cs
- LinqDataView.cs
- DBSqlParserTableCollection.cs
- EditorAttribute.cs
- UiaCoreApi.cs
- KerberosTicketHashIdentifierClause.cs
- CodeCompileUnit.cs
- AttributedMetaModel.cs
- MouseEvent.cs
- PlainXmlDeserializer.cs
- DynamicResourceExtensionConverter.cs
- _LocalDataStore.cs
- Application.cs
- TypeExtension.cs
- ChannelCacheSettings.cs
- ProxyManager.cs
- HttpCachePolicy.cs
- BamlRecordReader.cs
- AudioSignalProblemOccurredEventArgs.cs
- OverrideMode.cs
- BindingListCollectionView.cs
- KeysConverter.cs
- IsolatedStorageFilePermission.cs
- DataGridPageChangedEventArgs.cs
- DbConnectionPoolGroup.cs
- SystemIcmpV6Statistics.cs
- LoadWorkflowCommand.cs
- ChtmlImageAdapter.cs
- TrackPoint.cs
- RelationshipManager.cs
- BasicExpandProvider.cs
- IItemProperties.cs
- RijndaelCryptoServiceProvider.cs
- BamlReader.cs
- XLinq.cs
- Application.cs
- RedBlackList.cs
- filewebresponse.cs
- ErrorRuntimeConfig.cs
- LeftCellWrapper.cs
- MatchingStyle.cs
- TextServicesContext.cs
- BitmapFrameEncode.cs
- RootProfilePropertySettingsCollection.cs
- SamlAssertionDirectKeyIdentifierClause.cs
- InvokeHandlers.cs
- NullableFloatAverageAggregationOperator.cs
- Variant.cs
- ProfileProvider.cs
- DESCryptoServiceProvider.cs
- EdmTypeAttribute.cs
- WebUtil.cs
- LoginName.cs
- SerialErrors.cs
- ButtonRenderer.cs
- XmlDictionary.cs
- UIntPtr.cs
- CounterCreationData.cs
- EmbeddedMailObject.cs
- CallSiteBinder.cs
- BindingsCollection.cs
- DesignColumn.cs
- _Rfc2616CacheValidators.cs
- _Semaphore.cs
- Rect.cs
- WS2007HttpBinding.cs
- PointAnimationClockResource.cs
- ControlPager.cs
- DataGridCellItemAutomationPeer.cs
- AnnotationObservableCollection.cs
- ExeContext.cs
- DetailsView.cs
- CancellationToken.cs
- OdbcErrorCollection.cs
- KnownIds.cs
- InternalRelationshipCollection.cs
- RequiredAttributeAttribute.cs
- MetabaseServerConfig.cs
- ConfigurationManagerHelper.cs
- RelatedCurrencyManager.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- SQLBinary.cs
- ColorIndependentAnimationStorage.cs
- ComboBoxAutomationPeer.cs
- JsonCollectionDataContract.cs
- SynthesizerStateChangedEventArgs.cs
- ToolStripTextBox.cs
- UserControlCodeDomTreeGenerator.cs
- DoubleCollectionConverter.cs
- OleDbParameter.cs
- SplitterEvent.cs
- BindingNavigatorDesigner.cs
- PerformanceCounterLib.cs
- WebBrowserUriTypeConverter.cs
- AsnEncodedData.cs