语言

DataGridView.UpdateRowHeightInfo(Int32, Boolean) 方法

定义

强制指定行或行更新其高度信息。

public:
 void UpdateRowHeightInfo(int rowIndex, bool updateToEnd);
public void UpdateRowHeightInfo(int rowIndex, bool updateToEnd);
member this.UpdateRowHeightInfo : int * bool -> unit
Public Sub UpdateRowHeightInfo (rowIndex As Integer, updateToEnd As Boolean)

参数

rowIndex
Int32

要更新的第一行的从零开始的索引。

updateToEnd
Boolean

true 更新指定的行和所有后续行。

例外

rowIndex 小于 0 且 updateToEnd 为 true.

-或-

rowIndex 小于 -1 且 updateToEnd 为 false。

-或-

rowIndex 大于集合中 Rows 最高的行索引。

注解

当你自己使用处理程序和RowHeightInfoNeededRowHeightInfoPushed事件维护行高时,此方法非常有用。 每当更改事件处理程序外部存储的 RowHeightInfoPushed 行高度时,调用此方法。 这将强制 DataGridView 控件通过 RowHeightInfoNeeded 事件处理程序检索更新的高度信息。

适用于

另请参阅