473,385 Members | 1,317 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

About the PropertyGird.PropertyValueChanged event

I put a PropertyGrid in my windows application. I want to change a object's property in Runtime
I used PropertyValueChanged event to tell the application which property has been changed
But if the changed property is a collection type object, the event can not occur
I think it is because that the collection object's instance doesn't have any change, it hasn't been removed or anything
Only the item's contents have been changed
So, how could I know this change
This is my sample
public class Form1 : System.Windows.Forms.For

private System.Windows.Forms.ListBox listBox1
private System.Windows.Forms.PropertyGrid propertyGrid
public Form1(

InitializeComponent()

private void InitializeComponent(

this.propertyGrid = new System.Windows.Forms.PropertyGrid()
this.listBox1 = new System.Windows.Forms.ListBox()

this.propertyGrid.Location = new System.Drawing.Point(92, 4)
this.propertyGrid.Name = "propertyGrid"
this.propertyGrid.SelectedObject = this.listBox1
this.propertyGrid.Size = new System.Drawing.Size(156, 388)
this.propertyGrid.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHand ler(this.propertyGrid_PropertyValueChanged)

this.listBox1.Location = new System.Drawing.Point(4, 4)
this.listBox1.Name = "listBox1"
this.listBox1.Size = new System.Drawing.Size(88, 43)

this.Controls.Add(this.listBox1)
this.Controls.Add(this.propertyGrid)

private void propertyGrid_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e

MessageBox.Show(e.ChangedItem.Label)

}
Nov 16 '05 #1
0 1703

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: Olav.NET | last post by:
I am a .NET/C++ developer who is supposed to do some work with Access. I do not know much about it except for the DB part. Questions: *1* I am looking for INTENSIVE books to get quickly up to...
0
by: rawCoder | last post by:
Hi All, I have a class set as source object for a propertygrid. This class is being persisted in custom way in XML file. When the data changes, which i get to know form the PropertyValueChanged...
0
by: micro_bug | last post by:
Now I am developing a tool, just like VS.net Form Edition environment. User can edit a component's properties by a PropertyGrid control. Now I have some questions about this PropertyGrid control:...
2
by: David W. Simmonds | last post by:
I have a custom object that I use in a PropertyGrid as seen below. It presents an elipsis button that when clicked brings up a custom modal dialog. When I make a change in the property, the...
3
by: Minh Khoa | last post by:
Please give me more information about delegate and its usage? Why do i use it and when?
0
by: stulika19 | last post by:
Hi I am using Collection Editor in my Property Grid.When I change value of a property in the property grid, the PropertyValueChanged event is raised and and I am able to execute certain lines of...
0
by: Tulika Shrivastava | last post by:
Hi I am using Collection Editor in my Property Grid.When I change value of a property in the property grid, the PropertyValueChanged event is raised and and I am able to execute certain lines of...
7
by: AMP | last post by:
Hello, I have this in form1: namespace Pass { public partial class Form1 : Form { public Form2 form2; public Form1() {
3
by: Tony | last post by:
Hello! Is it the normal procedure in C# and .NET framework to always use the actual event object which is passed as the second parameters to the event handler. All of them are derived from...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.