DataGridColumnStyle.UpdateUI(CurrencyManager, Int32, String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
用给定的文本更新指定行的值。
protected public:
virtual void UpdateUI(System::Windows::Forms::CurrencyManager ^ source, int rowNum, System::String ^ instantText);
protected public:
virtual void UpdateUI(System::Windows::Forms::CurrencyManager ^ source, int rowNum, System::String ^ displayText);
protected internal virtual void UpdateUI (System.Windows.Forms.CurrencyManager source, int rowNum, string instantText);
protected internal virtual void UpdateUI (System.Windows.Forms.CurrencyManager source, int rowNum, string displayText);
abstract member UpdateUI : System.Windows.Forms.CurrencyManager * int * string -> unit
override this.UpdateUI : System.Windows.Forms.CurrencyManager * int * string -> unit
abstract member UpdateUI : System.Windows.Forms.CurrencyManager * int * string -> unit
override this.UpdateUI : System.Windows.Forms.CurrencyManager * int * string -> unit
Protected Friend Overridable Sub UpdateUI (source As CurrencyManager, rowNum As Integer, instantText As String)
Protected Friend Overridable Sub UpdateUI (source As CurrencyManager, rowNum As Integer, displayText As String)
参数
- source
- CurrencyManager
- rowNum
- Int32
要更新的行。
- instantTextdisplayText
- String
新值。
示例
下面的代码示例使用 UpdateUI 设置新值。
void UpdateGridUI()
{
// Get the MyDataGridColumnStyle to update.
// MyDataGridColumnStyle is a class derived from DataGridColumnStyle.
MyDataGridColumnStyle^ myGridColumn = dynamic_cast<MyDataGridColumnStyle^>(dataGrid1->TableStyles[ 0 ]->GridColumnStyles[ "CompanyName" ]);
// Call UpdateUI.
myGridColumn->UpdateUI( myCurrencyManager, 10, "my new value" );
}
private void UpdateGridUI() {
// Get the MyDataGridColumnStyle to update.
// MyDataGridColumnStyle is a class derived from DataGridColumnStyle.
MyDataGridColumnStyle myGridColumn =
(MyDataGridColumnStyle)dataGrid1.TableStyles[0].GridColumnStyles["CompanyName"];
// Call UpdateUI.
myGridColumn.UpdateUI(myCurrencyManager, 10, "my new value");
}
Private Sub UpdateGridUI()
' Get the MyDataGridColumnStyle to update.
' MyDataGridColumnStyle is a class derived from DataGridColumnStyle.
Dim myGridColumn As MyDataGridColumnStyle = CType _
(dataGrid1.TableStyles(0).GridColumnStyles("CompanyName"), _
MyDataGridColumnStyle)
' Call UpdateUI.
myGridColumn.UpdateUI(myCurrencyManager, 10, "my new value")
End Sub