<?xml version="1.0" encoding="utf-8"?>
<Type Name="DataGridViewCellParsingEventHandler" FullName="System.Windows.Forms.DataGridViewCellParsingEventHandler">
  <TypeSignature Language="C#" Value="public delegate void DataGridViewCellParsingEventHandler(object sender, DataGridViewCellParsingEventArgs e);" />
  <AssemblyInfo>
    <AssemblyName>System.Windows.Forms</AssemblyName>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <Base>
    <BaseTypeName>System.Delegate</BaseTypeName>
  </Base>
  <Parameters>
    <Parameter Name="sender" Type="System.Object" />
    <Parameter Name="e" Type="System.Windows.Forms.DataGridViewCellParsingEventArgs" />
  </Parameters>
  <ReturnValue>
    <ReturnType>System.Void</ReturnType>
  </ReturnValue>
  <Docs>
    <param name="sender">To be added.</param>
    <param name="e">To be added.</param>
    <since version=".NET 2.0" />
    <remarks>
      <attribution license="cc4" from="Microsoft" modified="false" />
      <para>Handle the <see cref="E:System.Windows.Forms.DataGridView.CellParsing" /> event to provide custom value conversion from a user-specified value to a value in the type specified by the cell <see cref="P:System.Windows.Forms.DataGridViewCell.ValueType" /> property.</para>
      <para>When you handle the <see cref="E:System.Windows.Forms.DataGridView.CellParsing" /> event, you can convert the value yourself or you can customize the default conversion. For example, you can convert the value yourself using the cell <see cref="M:System.Windows.Forms.DataGridViewCell.ParseFormattedValue(System.Object,System.Windows.Forms.DataGridViewCellStyle,System.ComponentModel.TypeConverter,System.ComponentModel.TypeConverter)" /> method with type converters of your choosing. Alternatively, you can let the default type converters parse the value, but modify the <see cref="P:System.Windows.Forms.DataGridViewCellStyle.NullValue" />, <see cref="P:System.Windows.Forms.DataGridViewCellStyle.DataSourceNullValue" />, and <see cref="P:System.Windows.Forms.DataGridViewCellStyle.FormatProvider" /> properties of the object returned by the <see cref="P:System.Windows.Forms.DataGridViewCellParsingEventArgs.InheritedCellStyle" /> property, which is initialized using the cell <see cref="P:System.Windows.Forms.DataGridViewCell.InheritedStyle" /> property.</para>
      <para>When you convert the value yourself, replace the initial, formatted value of the <see cref="P:System.Windows.Forms.ConvertEventArgs.Value" /> property with the converted value in the type specified by the cell <see cref="P:System.Windows.Forms.DataGridViewCell.ValueType" /> property. To indicate that no further parsing is necessary, set the <see cref="P:System.Windows.Forms.DataGridViewCellParsingEventArgs.ParsingApplied" /> property to true. </para>
      <para>When the event handler completes, if the <see cref="P:System.Windows.Forms.ConvertEventArgs.Value" /> is null or is not of the correct type, or the <see cref="P:System.Windows.Forms.DataGridViewCellParsingEventArgs.ParsingApplied" /> property is false, the <see cref="P:System.Windows.Forms.ConvertEventArgs.Value" /> is parsed using the cell <see cref="M:System.Windows.Forms.DataGridViewCell.ParseFormattedValue(System.Object,System.Windows.Forms.DataGridViewCellStyle,System.ComponentModel.TypeConverter,System.ComponentModel.TypeConverter)" /> method with default type converters. The default implementation of this method parses the value using the <see cref="P:System.Windows.Forms.DataGridViewCellStyle.NullValue" />, <see cref="P:System.Windows.Forms.DataGridViewCellStyle.DataSourceNullValue" />, and <see cref="P:System.Windows.Forms.DataGridViewCellStyle.FormatProvider" /> properties of the cell style passed in. If the value is not equal to <see cref="P:System.Windows.Forms.DataGridViewCellStyle.NullValue" />, the value is parsed using the <see cref="P:System.Windows.Forms.DataGridViewCellStyle.FormatProvider" /> property and the type converters passed in. </para>
      <para>To customize the conversion of a cell value into a formatted value for display, handle the <see cref="E:System.Windows.Forms.DataGridView.CellFormatting" /> event.</para>
      <para>For more information about handling events, see <format type="text/html"><a href="01E4F1BC-E55E-413F-98C7-6588493E5F67">Consuming Events</a></format>.</para>
      <para>When you create a <see cref="T:System.Windows.Forms.DataGridViewCellParsingEventHandler" /> delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event-handler delegates, see <format type="text/html"><a href="d98fd58b-fa4f-4598-8378-addf4355a115">Events and Delegates</a></format>.</para>
    </remarks>
    <summary>
      <attribution license="cc4" from="Microsoft" modified="false" />
      <para>Represents the method that will handle a <see cref="E:System.Windows.Forms.DataGridView.CellParsing" /> event of a <see cref="T:System.Windows.Forms.DataGridView" />.</para>
    </summary>
  </Docs>
</Type>