DataGridView.UpdateRowErrorText 方法

定义

强制一行或多行更新其错误文本。

重载

UpdateRowErrorText(Int32)

强制给定行索引处的行更新其错误文本。

UpdateRowErrorText(Int32, Int32)

强制给定范围中的行更新其错误文本。

UpdateRowErrorText(Int32)

强制给定行索引处的行更新其错误文本。

public:
 void UpdateRowErrorText(int rowIndex);
public void UpdateRowErrorText (int rowIndex);
member this.UpdateRowErrorText : int -> unit
Public Sub UpdateRowErrorText (rowIndex As Integer)

参数

rowIndex
Int32

要更新的行的索引(从零开始)。

例外

rowIndex 不在 0 到控件中的行数减 1 的有效范围内。

注解

通过处理 事件自行维护行错误文本时, RowErrorTextNeeded 此方法非常有用。 更改指定行的存储错误文本时调用此方法。 这将强制 DataGridView 控件通过 RowErrorTextNeeded 事件处理程序检索更新的文本。

另请参阅

适用于

UpdateRowErrorText(Int32, Int32)

强制给定范围中的行更新其错误文本。

public:
 void UpdateRowErrorText(int rowIndexStart, int rowIndexEnd);
public void UpdateRowErrorText (int rowIndexStart, int rowIndexEnd);
member this.UpdateRowErrorText : int * int -> unit
Public Sub UpdateRowErrorText (rowIndexStart As Integer, rowIndexEnd As Integer)

参数

rowIndexStart
Int32

要更新的一组行中第一行的索引(从零开始)。

rowIndexEnd
Int32

要更新的一组行中最后一行的索引(从零开始)。

例外

rowIndexStart 不在 0 到控件中的行数减 1 的有效范围内。

- 或 -

rowIndexEnd 不在 0 到控件中的行数减 1 的有效范围内。

- 或 -

rowIndexEnd 小于 rowIndexStart

注解

通过处理 事件自行维护行错误文本时, RowErrorTextNeeded 此方法非常有用。 更改指定行的存储错误文本时,请调用此方法。 这将强制 DataGridView 控件通过 RowErrorTextNeeded 事件处理程序检索更新的文本。

另请参阅

适用于