Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewDataErrorEventArgs.cs / 1 / DataGridViewDataErrorEventArgs.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Windows.Forms
{
using System;
using System.Drawing;
using System.Diagnostics;
using System.ComponentModel;
///
public class DataGridViewDataErrorEventArgs : DataGridViewCellCancelEventArgs
{
private Exception exception;
private bool throwException;
private DataGridViewDataErrorContexts context;
///
public DataGridViewDataErrorEventArgs(Exception exception,
int columnIndex,
int rowIndex,
DataGridViewDataErrorContexts context) : base(columnIndex, rowIndex)
{
Debug.Assert(rowIndex > -1);
this.exception = exception;
this.context = context;
}
///
public DataGridViewDataErrorContexts Context
{
get
{
return this.context;
}
}
///
public Exception Exception
{
get
{
return this.exception;
}
}
///
public bool ThrowException
{
get
{
return this.throwException;
}
set
{
if (value && this.exception == null)
{
throw new ArgumentException(SR.GetString(SR.DataGridView_CannotThrowNullException));
}
this.throwException = value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Windows.Forms
{
using System;
using System.Drawing;
using System.Diagnostics;
using System.ComponentModel;
///
public class DataGridViewDataErrorEventArgs : DataGridViewCellCancelEventArgs
{
private Exception exception;
private bool throwException;
private DataGridViewDataErrorContexts context;
///
public DataGridViewDataErrorEventArgs(Exception exception,
int columnIndex,
int rowIndex,
DataGridViewDataErrorContexts context) : base(columnIndex, rowIndex)
{
Debug.Assert(rowIndex > -1);
this.exception = exception;
this.context = context;
}
///
public DataGridViewDataErrorContexts Context
{
get
{
return this.context;
}
}
///
public Exception Exception
{
get
{
return this.exception;
}
}
///
public bool ThrowException
{
get
{
return this.throwException;
}
set
{
if (value && this.exception == null)
{
throw new ArgumentException(SR.GetString(SR.DataGridView_CannotThrowNullException));
}
this.throwException = value;
}
}
}
}
// 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
- StylusPointProperty.cs
- GraphicsState.cs
- VirtualizingPanel.cs
- DBSqlParserTableCollection.cs
- AdditionalEntityFunctions.cs
- Interlocked.cs
- XMLSchema.cs
- WorkflowInstanceExtensionManager.cs
- ErrorStyle.cs
- Ipv6Element.cs
- HtmlEncodedRawTextWriter.cs
- ByteStorage.cs
- WebPartConnectionsConnectVerb.cs
- UnsafeNativeMethodsTablet.cs
- PrimitiveXmlSerializers.cs
- SqlCacheDependencyDatabaseCollection.cs
- PageRanges.cs
- DataGridToolTip.cs
- SqlInternalConnection.cs
- Wildcard.cs
- TypeCodeDomSerializer.cs
- Globals.cs
- PaintEvent.cs
- EncoderReplacementFallback.cs
- _UncName.cs
- ColorBlend.cs
- CachedTypeface.cs
- Currency.cs
- ObjectDataSourceEventArgs.cs
- CorePropertiesFilter.cs
- AssociationType.cs
- CollectionBase.cs
- UnhandledExceptionEventArgs.cs
- XslCompiledTransform.cs
- SessionChannels.cs
- SmtpFailedRecipientException.cs
- EntityDataSourceEntitySetNameItem.cs
- SecurityRuntime.cs
- LocatorBase.cs
- LayoutTableCell.cs
- CLSCompliantAttribute.cs
- SqlClientWrapperSmiStream.cs
- ApplicationContext.cs
- Soap12ServerProtocol.cs
- SHA256.cs
- EFColumnProvider.cs
- RowBinding.cs
- ProjectionRewriter.cs
- HtmlFormAdapter.cs
- GestureRecognizer.cs
- WinFormsSecurity.cs
- DelegateBodyWriter.cs
- QueryExpr.cs
- AnimationException.cs
- ReadOnlyHierarchicalDataSourceView.cs
- PartBasedPackageProperties.cs
- CultureInfoConverter.cs
- Pkcs9Attribute.cs
- Point3DCollection.cs
- PathData.cs
- ByteKeyFrameCollection.cs
- OperationFormatUse.cs
- MenuItem.cs
- ContextMenuStrip.cs
- ArgIterator.cs
- ConfigXmlElement.cs
- DataServiceRequestOfT.cs
- TextDecorationLocationValidation.cs
- XmlTextEncoder.cs
- WindowsStreamSecurityBindingElement.cs
- ObjectQuery_EntitySqlExtensions.cs
- KeyboardEventArgs.cs
- IgnorePropertiesAttribute.cs
- NativeMethods.cs
- PrintPageEvent.cs
- Rights.cs
- SqlCaseSimplifier.cs
- HtmlFormParameterReader.cs
- ToolboxBitmapAttribute.cs
- ToolStripPanel.cs
- NotificationContext.cs
- TripleDES.cs
- TemplatedWizardStep.cs
- DetailsViewDeleteEventArgs.cs
- StringKeyFrameCollection.cs
- CryptoConfig.cs
- BindingCollection.cs
- SamlAuthorizationDecisionStatement.cs
- Journal.cs
- Converter.cs
- WebPartDisplayModeCollection.cs
- XmlSchemaComplexContentExtension.cs
- ColorTransform.cs
- MissingManifestResourceException.cs
- CompositeFontInfo.cs
- SignatureTargetIdManager.cs
- Scene3D.cs
- PropertyMapper.cs
- ADConnectionHelper.cs
- DataGridViewTopRowAccessibleObject.cs