DataGridColumnStyle.PropertyDescriptorChanged イベント
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Public Event PropertyDescriptorChanged As EventHandler
Dim instance As DataGridColumnStyle Dim handler As EventHandler AddHandler instance.PropertyDescriptorChanged, handler
public event EventHandler PropertyDescriptorChanged
public: event EventHandler^ PropertyDescriptorChanged { void add (EventHandler^ value); void remove (EventHandler^ value); }
/** @event */ public void add_PropertyDescriptorChanged (EventHandler value) /** @event */ public void remove_PropertyDescriptorChanged (EventHandler value)


Private Sub myButton_Click(ByVal sender As Object, ByVal e As EventArgs) If TablesAlreadyAdded Then Return End If AddCustomDataTableStyle() End Sub 'myButton_Click Private Sub AddCustomDataTableStyle() Dim myTableStyle As New DataGridTableStyle() ' Map DataGridTableStyle to a DataTable. myTableStyle.MappingName = "Orders" ' Get CurrencyManager object. Dim myCurrencyManager As CurrencyManager = CType(BindingContext(myDataSet, "Orders"), CurrencyManager) ' Use the CurrencyManager to get the PropertyDescriptor for column. Dim myPropertyDescriptor As PropertyDescriptor = myCurrencyManager.GetItemProperties()("Amount") ' Construct a 'DataGridColumnStyle' object changing its format to 'Currency'. Dim myColumnStyle As DataGridTextBoxColumn = New DataGridTextBoxColumn(myPropertyDescriptor, "c", True) ' Add EventHandler function for PropertyDescriptorChanged Event. AddHandler myColumnStyle.PropertyDescriptorChanged, AddressOf MyPropertyDescriptor_Changed myTableStyle.GridColumnStyles.Add(myColumnStyle) ' Add the DataGridTableStyle instance to the GridTableStylesCollection. myDataGrid.TableStyles.Add(myTableStyle) TablesAlreadyAdded = True End Sub 'AddCustomDataTableStyle Private Sub MyPropertyDescriptor_Changed(ByVal sender As Object, ByVal e As EventArgs) myLabel.Text = "Property Descriptor Property of DataGridColumnStyle has changed" End Sub 'MyPropertyDescriptor_Changed
private void myButton_Click(object sender, EventArgs e) { if(TablesAlreadyAdded) { return; } AddCustomDataTableStyle(); } private void AddCustomDataTableStyle() { DataGridTableStyle myTableStyle = new DataGridTableStyle(); // Map DataGridTableStyle to a DataTable. myTableStyle.MappingName = "Orders"; // Get CurrencyManager object. CurrencyManager myCurrencyManager = (CurrencyManager)BindingContext[myDataSet ,"Orders"]; // Use the CurrencyManager to get the PropertyDescriptor for column. PropertyDescriptor myPropertyDescriptor = myCurrencyManager.GetItemProperties()["Amount"]; // Construct a 'DataGridColumnStyle' object changing its format to 'Currency'. DataGridColumnStyle myColumnStyle = new DataGridTextBoxColumn(myPropertyDescriptor ,"c",true); // Add EventHandler function for PropertyDescriptorChanged Event. myColumnStyle.PropertyDescriptorChanged+=new System.EventHandler(MyPropertyDescriptor_Changed); myTableStyle.GridColumnStyles.Add(myColumnStyle); // Add the DataGridTableStyle instance to the GridTableStylesCollection. myDataGrid.TableStyles.Add(myTableStyle); TablesAlreadyAdded=true; } private void MyPropertyDescriptor_Changed(object sender,EventArgs e) { myLabel.Text="Property Descriptor Property of DataGridColumnStyle has changed"; }
private: void myButton_Click( Object^ /*sender*/, EventArgs^ /*e*/ ) { if ( TablesAlreadyAdded ) { return; } AddCustomDataTableStyle(); } void AddCustomDataTableStyle() { DataGridTableStyle^ myTableStyle = gcnew DataGridTableStyle; // Map DataGridTableStyle to a DataTable. myTableStyle->MappingName = "Orders"; // Get CurrencyManager object. CurrencyManager^ myCurrencyManager = dynamic_cast<CurrencyManager^>(BindingContext[myDataSet, "Orders"]); // Use the CurrencyManager to get the PropertyDescriptor for column. PropertyDescriptor^ myPropertyDescriptor = myCurrencyManager->GetItemProperties()[ "Amount" ]; // Construct a 'DataGridColumnStyle' object changing its format to 'Currency'. DataGridColumnStyle^ myColumnStyle = gcnew DataGridTextBoxColumn( myPropertyDescriptor,"c",true ); // Add EventHandler function for PropertyDescriptorChanged Event. myColumnStyle->PropertyDescriptorChanged += gcnew System::EventHandler( this, &myDataForm::MyPropertyDescriptor_Changed ); myTableStyle->GridColumnStyles->Add( myColumnStyle ); // Add the DataGridTableStyle instance to the GridTableStylesCollection. myDataGrid->TableStyles->Add( myTableStyle ); TablesAlreadyAdded = true; } void MyPropertyDescriptor_Changed( Object^ /*sender*/, EventArgs^ /*e*/ ) { myLabel->Text = "Property Descriptor Property of DataGridColumnStyle has changed"; }
protected void myButton_Click(Object sender, EventArgs e) { if (TablesAlreadyAdded) { return; } AddCustomDataTableStyle(); } //myButton_Click private void AddCustomDataTableStyle() { DataGridTableStyle myTableStyle = new DataGridTableStyle(); // Map DataGridTableStyle to a DataTable. myTableStyle.set_MappingName("Orders"); // Get CurrencyManager object. CurrencyManager myCurrencyManager = (CurrencyManager) get_BindingContext().get_Item(myDataSet, "Orders"); // Use the CurrencyManager to get the PropertyDescriptor for column. PropertyDescriptor myPropertyDescriptor = myCurrencyManager.GetItemProperties().get_Item("Amount"); // Construct a 'DataGridColumnStyle' object changing its format to // 'Currency'. DataGridColumnStyle myColumnStyle = new DataGridTextBoxColumn(myPropertyDescriptor, "c", true); // Add EventHandler function for PropertyDescriptorChanged Event. myColumnStyle.add_PropertyDescriptorChanged(new System.EventHandler( MyPropertyDescriptorChanged)); myTableStyle.get_GridColumnStyles().Add(myColumnStyle); // Add the DataGridTableStyle instance to the GridTableStylesCollection. myDataGrid.get_TableStyles().Add(myTableStyle); TablesAlreadyAdded = true; } //AddCustomDataTableStyle void MyPropertyDescriptorChanged(Object sender, EventArgs e) { myLabel.set_Text("Property Descriptor Property of " + "DataGridColumnStyle has changed"); } //MyPropertyDescriptorChanged
protected void myButton_Click(Object sender, EventArgs e) { if(TablesAlreadyAdded) { return; } AddCustomDataTableStyle(); } //myButton_Click private void AddCustomDataTableStyle() { DataGridTableStyle myTableStyle = new DataGridTableStyle(); // Map DataGridTableStyle to a DataTable. myTableStyle.set_MappingName("Orders"); // Get CurrencyManager object. CurrencyManager myCurrencyManager = (CurrencyManager) get_BindingContext().get_Item(myDataSet, "Orders"); // Use the CurrencyManager to get the PropertyDescriptor for column. PropertyDescriptor myPropertyDescriptor = myCurrencyManager. GetItemProperties().get_Item("Amount"); // Construct a 'DataGridColumnStyle' object changing its format to // 'Currency'. DataGridColumnStyle myColumnStyle = new DataGridTextBoxColumn(myPropertyDescriptor, "c", true); // Add EventHandler function for PropertyDescriptorChanged Event. myColumnStyle.add_PropertyDescriptorChanged(new System. EventHandler(MyPropertyDescriptorChanged)); myTableStyle.get_GridColumnStyles().Add(myColumnStyle); // Add the DataGridTableStyle instance to the // GridTableStylesCollection. myDataGrid.get_TableStyles().Add(myTableStyle); TablesAlreadyAdded = true; } //AddCustomDataTableStyle void MyPropertyDescriptorChanged(Object sender, EventArgs e) { myLabel.set_Text("Property Descriptor Property of " + "DataGridColumnStyle has changed"); } //MyPropertyDescriptorChanged

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からDataGridColumnStyle.PropertyDescriptorChanged イベントを検索する場合は、下記のリンクをクリックしてください。

- DataGridColumnStyle.PropertyDescriptorChanged イベントのページへのリンク