DataGridViewRow.GetErrorText(Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得指定索引處之資料列的錯誤文字。
public:
System::String ^ GetErrorText(int rowIndex);
public string GetErrorText (int rowIndex);
member this.GetErrorText : int -> string
Public Function GetErrorText (rowIndex As Integer) As String
參數
- rowIndex
- Int32
包含錯誤的資料列索引。
傳回
字串,描述在指定索引處的資料列錯誤。
例外狀況
資料列屬於 DataGridView 控制項而且是共用資料列。
這個資料列屬於 DataGridView 控制項,而且 rowIndex
小於零或大於控制項中的資料列數減一。
備註
GetErrorText傳遞您用來擷取的DataGridViewRow索引方法。 請勿將 Index 屬性用於 rowIndex
參數。 如果共享數據列, Index 則 為 -1,這是 的 rowIndex
無效值。 如需數據列共用的詳細資訊,請參閱調整 dataGridView 控件 Windows Forms 最佳做法。
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應