Changing extensions in PropertyGrid

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there,

I've got a class contain some double and int values and properties..
I created a PropertyGrid and selected the class to see the values.. This is
ok..
But I would like some postfixes on my fields.. I.e. instead of just showing
"Length | 23.43", I would like it to show "Length | 23.43 m" and so on.
So it automatically appends "m" whenever i change value..
I know I can do this by setting property type to string and doing it there,
but its sooo cumbersome..
Can anyone provide any insight.
Thanks alot in advance.

Any help would
 
You will need to implement your own typeconvertor derived from TypeConvertor
and apply it to your property using the TypeConvertor attribute. In the
derived class, override CanCovertTo and ConvertTo such that it handles
strings.

---------
- G Himangi, Sky Software http://www.ssware.com
Shell MegaPack : GUI Controls For Drop-In Windows Explorer like Shell
Browsing Functionality For Your App (.Net & ActiveX Editions).
EZNamespaceExtensions.Net : Develop namespace extensions rapidly in .Net
EZShellExtensions.Net : Develop all shell extensions,explorer bars and BHOs
rapidly in .Net
 
Back
Top