語言

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 事件處理程序取得更新後的高度資訊。

適用於

另請參閱