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)

public protected:
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.

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" );
}

.NET Framework
Available since 1.1
Return to top
Show: