473,473 Members | 1,556 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to Update Property Box

Tom
I have a component that inherits from a textbox. I have added some
properties. Certain changes to one property cause changes to another
property. How do I get those changes to appear in the properties box?
They will show up if you highlight the property but not before. I've
tried this.Update and this.Refresh. They did nothing. Help!

Tom
Nov 16 '05 #1
2 1632
Tom,

What you have to do is create an event named <PropertyName>Changed of
type EventHandler. After you change the value of the property in code, fire
the event. The property grid will hook up to the appropriate event handlers
and then update grid when other properties change as a result.

In .NET 2.0, there is an IPropertyChange interface which will be
supported, which will have a single event you can fire which will indicate
the property that changed.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Tom" <no*****@nowhere.none> wrote in message
news:uP**************@TK2MSFTNGP11.phx.gbl...
I have a component that inherits from a textbox. I have added some
properties. Certain changes to one property cause changes to another
property. How do I get those changes to appear in the properties box? They
will show up if you highlight the property but not before. I've tried
this.Update and this.Refresh. They did nothing. Help!

Tom

Nov 16 '05 #2
Tom
I tried what I understood you to be saying but got nothing. I'm writing
in VB but got no responses in the VB group so I came here. This is what
I tried. The property being changed is named DecimalPlaces.

Public Event DecimalPlacesChanged As EventHandler

Dim e As EventArgs
RaiseEvent DecimalPlacesChanged(Me, e)

Tom
Nicholas Paldino [.NET/C# MVP] wrote:
Tom,

What you have to do is create an event named <PropertyName>Changed of
type EventHandler. After you change the value of the property in code, fire
the event. The property grid will hook up to the appropriate event handlers
and then update grid when other properties change as a result.

In .NET 2.0, there is an IPropertyChange interface which will be
supported, which will have a single event you can fire which will indicate
the property that changed.

Hope this helps.

Nov 16 '05 #3

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

Similar topics

6
by: certolnut | last post by:
HI all New to C# I'm merging datasets. The source dataset is an excel file and the target dataset is in SqlServer. ...
4
by: Jonathan Upright | last post by:
Greetings to anyone who can help: I'm using WebMatrix to make ASP.NET pages, and I chose the "Editable DataGrid" at the project selector screen. As you may know, it defaults to the Microsoft...
3
by: Steve Teeples | last post by:
I was wondering if there is a way to force a property within a property grid to update and then display a modified value when when a second property (true/false) is toggled? -- Steve
0
by: kidders | last post by:
I have an business object bound to a formview with through an object datasource, in edit mode when i click update i receive the following error: The 'ActionID' property on the type specified by...
0
by: ckjaime | last post by:
I am extremely new to programing and am trying to teach myself Visual Basic. I wrote a program that connects to an Access database. It successfully reads the table, however it will not update it. ...
10
by: karlspharm | last post by:
I'm using Access to track property assigned to personnel. The problem that I've encountered has to do with marking the property as "Surplus" when it is no longer used. I have a surplus form...
3
by: pvong | last post by:
VB.NET How do you change a gridview from Update mode to normal mode? I'm usually dealing for Formviews and there is a ChangeMode option but I don't see one for Gridviews.
1
by: adithi | last post by:
My Table Structure is: Table A Table B Table C colA -PK Col B-PK Col C-PK Col B-FK ...
5
by: P.J.M. Beker | last post by:
Hi there, I'm currently writing a program in which I use the FileMonitor to monitor a folder in which I store downloaded images. I know that I can't add much coding in the filemonitor's event in...
0
by: cmrchs | last post by:
Hi, I'm trying out Databinding to a Data Acces Layer using a GridView and ObjectDataSource-control The Update works fine but the Delete-method doesn't ??? <asp:GridView ID="GridView1"...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.