UpdateUI Method

DataGridColumnStyle.UpdateUI Method (CurrencyManager, Int32, String)

 

Updates the value of a specified row with the given text.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

protected internal virtual void UpdateUI(
	CurrencyManager source,
	int rowNum,
	string displayText
)

Parameters

source
Type: System.Windows.Forms.CurrencyManager

The CurrencyManager associated with the DataGridColumnStyle.

rowNum
Type: System.Int32

The row to update.

displayText
Type: System.String

The new value.

The following code example uses the UpdateUI to set a 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");
}       

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft