Print Page | Close Window

PropertyGridItems - how to iterate over collection

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=17171
Printed Date: 04 May 2024 at 5:09am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: PropertyGridItems - how to iterate over collection
Posted By: AndyK3
Subject: PropertyGridItems - how to iterate over collection
Date Posted: 29 August 2010 at 5:53am

I am new to CodeJock and I have been experimenting with thePropertyGrid.

I have created a propertygrid that looks similar to the sample provided by CJ.
It has 4 Categories, each category has a number of Items and each Item in a Category has its own Items as well.
 
I'd like to iterate over the collection of Items and Categories to pick up values so that I can build an XML document and pass it to my application.
I need to flatten the structure and pass Name:Value pairs in the XML.
I see there is a Categories collection of the PropertyGrid which shows the 4 categories but I can't understand how to get at the Items collection.
 
Any help greatly appreciated
 
Thank you
 
Andy
CodeJock 13.1.0



Replies:
Posted By: Oleg
Date Posted: 29 August 2010 at 1:18pm
Hi,

Our sample has such code....Please check it first.

'Enumeration Samples
    For Each Category In wndPropertyGrid.Categories
       
        Debug.Print "Category "; Category.Caption
        For Each Item In Category.Childs
            Debug.Print " Item "; Item.Caption
    
        Next
    
    Next

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


Posted By: AndyK3
Date Posted: 29 August 2010 at 5:24pm
Thanks Oleg - this works a treat.
Andy



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