DataGridColumnStyle.UpdateUI 方法
用给定的文本更新指定行的值。
**命名空间:**System.Windows.Forms
**程序集:**System.Windows.Forms(在 system.windows.forms.dll 中)
语法
声明
Protected Friend Overridable Sub UpdateUI ( _
source As CurrencyManager, _
rowNum As Integer, _
displayText As String _
)
用法
Dim source As CurrencyManager
Dim rowNum As Integer
Dim displayText As String
Me.UpdateUI(source, rowNum, displayText)
protected internal virtual void UpdateUI (
CurrencyManager source,
int rowNum,
string displayText
)
protected public:
virtual void UpdateUI (
CurrencyManager^ source,
int rowNum,
String^ displayText
)
protected void UpdateUI (
CurrencyManager source,
int rowNum,
String displayText
)
protected internal function UpdateUI (
source : CurrencyManager,
rowNum : int,
displayText : String
)
参数
- source
与 DataGridColumnStyle 关联的 CurrencyManager。
- rowNum
要更新的行。
- displayText
新值。
示例
下面的代码示例使用 UpdateUI 设置一个新值。
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
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");
}
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.get_TableStyles().
get_Item(0).get_GridColumnStyles().get_Item("CompanyName"));
// Call UpdateUI.
myGridColumn.UpdateUI(myCurrencyManager, 10, "my new value");
} //UpdateGridUI
平台
Windows 98、Windows 2000 SP4、Windows CE、Windows Millennium Edition、Windows Mobile for Pocket PC、Windows Mobile for Smartphone、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition
.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求。
版本信息
.NET Framework
受以下版本支持:2.0、1.1、1.0
请参见
参考
DataGridColumnStyle 类
DataGridColumnStyle 成员
System.Windows.Forms 命名空间