Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Property Grid
  New Posts New Posts RSS Feed - PropertyGridItems - how to iterate over collection
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

PropertyGridItems - how to iterate over collection

 Post Reply Post Reply
Author
Message
AndyK3 View Drop Down
Newbie
Newbie


Joined: 29 August 2010
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndyK3 Quote  Post ReplyReply Direct Link To This Post Topic: PropertyGridItems - how to iterate over collection
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
AndyK3 View Drop Down
Newbie
Newbie


Joined: 29 August 2010
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndyK3 Quote  Post ReplyReply Direct Link To This Post Posted: 29 August 2010 at 5:24pm
Thanks Oleg - this works a treat.
Andy
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.