Print Page | Close Window

Childs remove item

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=1885
Printed Date: 27 November 2024 at 1:57am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Childs remove item
Posted By: JamesH
Subject: Childs remove item
Date Posted: 01 March 2005 at 1:33pm

Maybe I'm missing something, but if I have a mk:@MSITStore:C:\Program%20Files\Codejock%20Software\ActiveX\Xtreme%20Suite%20Pro%20ActiveX%20v9.60\help\XtremeSuite.chm::/XtremePropertyGrid~PropertyGridItem.html - PropertyGridItem  object that I want to remove from a property grid I can get it's Parent and then the Remove call on the Parents Childs collection.   However, the remove method takes the index into the Childs collection, not the actual child object to remove.  Is there an easy way to get this index?  The only way I can see to do it is to loop through the entire Childs collection until the object is found.

Where I am baffled is how do I remove a top level catagory?   The mk:@MSITStore:C:\Program%20Files\Codejock%20Software\ActiveX\Xtreme%20Suite%20Pro%20ActiveX%20v9.60\help\XtremeSuite.chm::/XtremePropertyGrid~PropertyGridItem.html - PropertyGridItem  will have a NULL parent so there is no Childs collection for me to remove from. 




Replies:
Posted By: Oleg
Date Posted: 01 March 2005 at 11:53pm

You can use PropertyGrid.Categories collection as parent for top level category.

 

we will add PropertyGridItem.Remove() method in 9.60.1



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: JamesH
Date Posted: 02 March 2005 at 4:43pm

Thanks for the reply Oleg,

Originally posted by oleg oleg wrote:

we will add PropertyGridItem.Remove() method in 9.60.1

While this would be useful in some situations, in my case it wouldn't actually be as useful.  I am removing an item and replacing it with the same item as a way to change the 'type' field.  Since type is read-only this is the only way I can think of to do it.  So just removing isn't enough, I need to know the index and collection so I can replace it.  (Ideally the type field wouldn't be read-only)

If multiple objects are selected and their properties are not the same for a field I display a text value "Varies" with a "..." button that will let them edit it.  When they hit "..." I remove the field and replace it with the apropraite int/double/bool/enum type.

Even if it doesn't fix my current situation, thank you for adding the PropertyGridItem.Remove() method in 9.60.1, I am sure it will come in useful in the future.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net