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

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

DataRow.RowError プロパティ

行のカスタム エラー説明取得または設定します

名前空間: System.Data
アセンブリ: System.Data (system.data.dll 内)
構文構文

Dim instance As DataRow
Dim value As String

value = instance.RowError

instance.RowError = value
public string RowError { get;
 set; }
/** @property */
public String get_RowError ()

/** @property */
public void set_RowError (String value)

プロパティ
エラー説明するテキスト

解説解説
使用例使用例

DataGrid コントロール表示されるテーブル10 行のエラー テキスト設定する例を次に示します

Private Sub SetRowErrors(ByVal
 table As DataTable)
    ' Set error text for ten rows. 
    Dim i As Integer
    For i = 0 to 10
        ' Insert column 1 value into each error.
        table.Rows(i).RowError = "ERROR: " & _
            table.Rows(i)(1).ToString()
    Next
    ' Get the DataSet for the table, and test it for errors.
    Dim dataSet As DataSet = table.DataSet
    TestForErrors(dataSet)
End Sub
 
Private Sub TestForErrors(ByVal
 dataSet As DataSet)
    ' Test for errors. If DataSet has errors, 
    ' test each table.
    If dataSet.HasErrors
        Dim tempDataTable As DataTable
        For Each tempDataTable in
 dataSet.Tables
            ' If the table has errors, then print them.
            If(tempDataTable.HasErrors) Then
 
                PrintRowErrs(tempDataTable)
            End If
        Next
        ' Refresh the DataGrid to see the error-marked rows.
        DataGrid1.Refresh()
    End If
End Sub
 
Private Sub PrintRowErrs(ByVal
 table As DataTable)
    Dim row As DataRow
    For Each row in table.Rows
       If(row.HasErrors) Then
          Console.WriteLine(row.RowError)
       End If
    Next
End Sub
private void SetRowErrors(DataTable table)
{
    // Set error text for ten rows. 
    for(int i = 0; i < 10; i++)
    {
        // Insert column 1 value into each error.
        table.Rows[i].RowError = "ERROR: " 
            + table.Rows[i][1];
    }
    // Get the DataSet for the table, and test it for errors.
    DataSet dataSet = table.DataSet;
    TestForErrors(dataSet);
}
 
private void TestForErrors(DataSet dataSet)
{
    // Test for errors. If DataSet has errors, test each table.
    if(dataSet.HasErrors)
    {
        foreach(DataTable tempDataTable in
 dataSet.Tables)
        {
            // If the table has errors, then print them.
            if(tempDataTable.HasErrors) 
                PrintRowErrs(tempDataTable);
        }
        // Refresh the DataGrid to see the error-marked rows.
        dataGrid1.Refresh();
    }
}
 
private void PrintRowErrs(DataTable table)
{
    foreach(DataRow row in table.Rows)
    {
        if(row.HasErrors) 
        {
            Console.WriteLine(row.RowError);
        }
    }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataRow クラス
DataRow メンバ
System.Data 名前空間
SetColumnError
HasErrors


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS