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 且 updateToEndtrue

-或-

rowIndex 小於 -1 且 updateToEndfalse

-或-

rowIndex 大於 Rows 集合中最高的資料列索引。

備註

當您自行使用 和 RowHeightInfoPushed 事件的處理常式 RowHeightInfoNeeded 來維護資料列高度時,這個方法很有用。 每當變更事件處理常式外部 RowHeightInfoPushed 的預存資料列高度時,請呼叫這個方法。 這會強制 DataGridView 控制項透過 RowHeightInfoNeeded 事件處理常式擷取更新的高度資訊。

適用於

另請參閱