DataGridView.RowErrorTextNeeded イベント
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Dim instance As DataGridView Dim handler As DataGridViewRowErrorTextNeededEventHandler AddHandler instance.RowErrorTextNeeded, handler
public: event DataGridViewRowErrorTextNeededEventHandler^ RowErrorTextNeeded { void add (DataGridViewRowErrorTextNeededEventHandler^ value); void remove (DataGridViewRowErrorTextNeededEventHandler^ value); }

RowErrorTextNeeded イベントは、DataGridView コントロールの DataSource プロパティが設定されているか、VirtualMode プロパティが true の場合にだけ発生します。RowErrorTextNeeded イベントの処理は、行の状態および行に含まれる値に応じて、行のエラーを判断する場合に便利です。
RowErrorTextNeeded イベントを処理して、ハンドラでエラー テキストを指定すると、ShowRowErrors プロパティが false に設定されていない限り、行ヘッダーにエラー グリフが表示されます。ユーザーがマウス ポインタをエラー グリフ上に移動すると、ツールヒントにエラー テキストが表示されます。
RowErrorTextNeeded イベントは、DataGridViewRow.ErrorText プロパティの値が取得されたときにも発生します。
DataGridViewRowErrorTextNeededEventArgs.RowIndex プロパティを使用すると、行の状態や行に含まれる値を特定し、その情報を使用して DataGridViewRowErrorTextNeededEventArgs.ErrorText プロパティを変更できます。このプロパティは、行の ErrorText プロパティの値によって初期化され、イベントの値によってオーバーライドされます。
RowErrorTextNeeded イベントは、多くのデータを処理するときに、複数行の ErrorText の値を設定することによるパフォーマンスの低下を防ぐために使用します。詳細については、「Windows フォーム DataGridView コントロールを拡張するための推奨される手順」を参照してください。

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


DataGridView クラス
DataGridView メンバ
System.Windows.Forms 名前空間
DataGridView.DataSource プロパティ
DataGridView.VirtualMode プロパティ
DataGridView.ShowRowErrors プロパティ
DataGridViewRowErrorTextNeededEventHandler
DataGridViewRowErrorTextNeededEventArgs
DataGridViewRowErrorTextNeededEventArgs.ErrorText
DataGridViewRow.ErrorText
OnRowErrorTextNeeded
その他の技術情報
DataGridView コントロール (Windows フォーム)
- DataGridView.RowErrorTextNeeded イベントのページへのリンク