DataGridViewCellParsingEventArgs.ParsingApplied プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DataGridViewCellParsingEventArgs.ParsingApplied プロパティの意味・解説 

DataGridViewCellParsingEventArgs.ParsingApplied プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

セルの値が正常に解析されたかどうかを示す値を取得または設定します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Dim instance As DataGridViewCellParsingEventArgs
Dim value As Boolean

value = instance.ParsingApplied

instance.ParsingApplied = value
public bool ParsingApplied { get;
 set; }
public:
property bool ParsingApplied {
    bool get ();
    void set (bool value);
}
/** @property */
public boolean get_ParsingApplied ()

/** @property */
public void set_ParsingApplied (boolean value)
public function get ParsingApplied
 () : boolean

public function set ParsingApplied
 (value : boolean)

プロパティ
セルの値が正常に解析され場合trueそれ以外場合false既定値false です。

解説解説

DataGridViewCellParsingEventHandler は、新しセルの値が正常に解析されそれ以上変換不要かどうかを示すために、ParsingApplied プロパティ設定します

使用例使用例

セルの値が正常に解析されたときに、ParsingAppliedtrue設定するコード例次に示します

' Handling CellParsing allows one to accept user input, then map it
 to a different
' internal representation.
Private Sub dataGridView1_CellParsing(ByVal
 sender As Object, _
    ByVal e As DataGridViewCellParsingEventArgs)
 _
    Handles dataGridView1.CellParsing

    If Me.dataGridView1.Columns(e.ColumnIndex).Name
 = _
        "Release Date" Then
        If e IsNot Nothing Then
            If e.Value IsNot Nothing Then
                Try
                    ' Map what the user typed into UTC.
                    e.Value = _
                    DateTime.Parse(e.Value.ToString()).ToUniversalTime()
                    ' Set the ParsingApplied property to 
                    ' Show the event is handled.
                    e.ParsingApplied = True

                Catch ex As FormatException
                    ' Set to false in case another CellParsing handler
                    ' wants to try to parse this DataGridViewCellParsingEventArgs
 instance.
                    e.ParsingApplied = False
                End Try
            End If
        End If
    End If
End Sub
// Handling CellParsing allows one to accept user input, then map it
 to a different
// internal representation.
private void dataGridView1_CellParsing(object
 sender, DataGridViewCellParsingEventArgs e)
{
    if (this.dataGridView1.Columns[e.ColumnIndex].Name
 == "Release Date")
    {
        if (e != null)
        {
            if (e.Value != null)
            {
                try
                {
                    // Map what the user typed into UTC.
                    e.Value = DateTime.Parse(e.Value.ToString()).ToUniversalTime();
                    // Set the ParsingApplied property to 
                    // Show the event is handled.
                    e.ParsingApplied = true;

                }
                catch (FormatException)
                {
                    // Set to false in case another CellParsing handler
                    // wants to try to parse this DataGridViewCellParsingEventArgs
 instance.
                    e.ParsingApplied = false;
                }
            }
        }
    }
}
// Handling CellParsing allows one to accept user input, then map it
 to a different
// internal representation.
void dataGridView1_CellParsing( Object^ /*sender*/, DataGridViewCellParsingEventArgs^
 e )
{
   if ( this->dataGridView1->Columns[
 e->ColumnIndex ]->Name->Equals( "Release Date" ) )
   {
      if ( e != nullptr )
      {
         if ( e->Value != nullptr )
         {
            try
            {
               // Map what the user typed into UTC.
               e->Value = DateTime::Parse( e->Value->ToString() ).ToUniversalTime();

               // Set the ParsingApplied property to 
               // Show the event is handled.
               e->ParsingApplied = true;
            }
            catch ( FormatException^ /*ex*/ ) 
            {
               // Set to false in case another CellParsing handler
               // wants to try to parse this DataGridViewCellParsingEventArgs
 instance.
               e->ParsingApplied = false;
            }
         }
      }
   }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataGridViewCellParsingEventArgs クラス
DataGridViewCellParsingEventArgs メンバ
System.Windows.Forms 名前空間
DataGridView クラス
DataGridView.CellParsing イベント
DataGridViewCellParsingEventHandler
ConvertEventArgs.Value プロパティ


このページでは「.NET Framework クラス ライブラリ リファレンス」からDataGridViewCellParsingEventArgs.ParsingApplied プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からDataGridViewCellParsingEventArgs.ParsingApplied プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からDataGridViewCellParsingEventArgs.ParsingApplied プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「DataGridViewCellParsingEventArgs.ParsingApplied プロパティ」の関連用語

DataGridViewCellParsingEventArgs.ParsingApplied プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



DataGridViewCellParsingEventArgs.ParsingApplied プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS