Tony,
I think you are going to have to create another object that will do this
for you. Basically, that object will implement the ICustomTypeDescriptor
interface, which the property grid will call upon to get the properties that
it should display.
Also, check out the .NET Matters section of MSDN magazine for April and
May of 2005. You can find them at:
http://msdn.microsoft.com/msdnmag/is...s/default.aspx
and
http://msdn.microsoft.com/msdnmag/is...s/default.aspx
These deal specifically with creating a custom wrapper that you can use
in your property grid control to control which properties are displayed.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Tony Maresca" <to**@whereever.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Greetings.
I would like to display the WMI properties for a printer
in a PropertyGrid, with minimal coding.
A WMI printer object is represented in managed code
using the System.Management.ManagementObject class,
which has a property named "Properties". The Properties
property is a PropertyDataCollection of PropertyData
objects, one PropertyData object for each property of the
printer.
Each PropertyData object has a Name (string) property
and a Value (object) property.
Any suggestions on how to approach this are appreciated.
--
Tony M.