How to hide a class name while showing a collection in the property grid.

Dec 27, 2012 at 5:12 AM
Edited Dec 27, 2012 at 5:13 AM

Hi,

How to hide class name while showing a class object in the form of collection in the propertygrid. Its creates confusion to the end user to look at class name. Is there a way to overwrite the class name with user defined value ?

Thanks,

Dinesh Patel

 

Coordinator
Dec 27, 2012 at 3:06 PM

There is no configurable way. But you can tweak this line of code in the collection form.

Title = collectionType.Name + " Collection Editor";

Dec 28, 2012 at 10:55 AM

Thanks for your reponse.

This will solve the problem to hide the class name in the childwindow title.. Is there any way  not to show the class name in the childwindow List item (left hand side) ? under members listbox ?

 

Thanks,

Dinesh

 

 

Coordinator
Dec 28, 2012 at 1:11 PM
Edited Dec 28, 2012 at 1:12 PM

To change what is displayed, just override the ToString method of your object. Internally that is what the ListBox control is calling for the display value.

Dec 28, 2012 at 2:12 PM
Edited Dec 28, 2012 at 2:13 PM

Thanks a lot ... It worked :) !!!!