Print Page | Close Window

Tree view icon not appearing for grandchild rows

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=22584
Printed Date: 23 November 2024 at 10:02am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Tree view icon not appearing for grandchild rows
Posted By: paulm_wlc
Subject: Tree view icon not appearing for grandchild rows
Date Posted: 28 April 2015 at 9:35am
I have a grid that has a row, plus child rows. The first column is hidden and contains an ID, the second column contains a checkbox, and the third column is the expand/collapse icon for child records. There are additional columns for data. This works as expected. 

Now I need to add another child level (ex. Parent/Child/Grandchild). I can add the rows to the child row, but they don't appear. I can set the Expanded property of the child row and then the grandchild records appear. However, in both cases I don't see the expand/collapse option that I see for the first parent/child set.

The (pseudo) code basically looks like this:

* ID column
col =  Columns.Add(0, "", 0, False)
col.Visible = False

* Checkbox column
col = Columns.Add(1, "", 20, False)
col.Tag = "check"

* Tree +/- column
col = Columns.Add(2, "", 20, False)
col.Tag = "tree"
col.TreeColumn = True

* The rest of the columns are added here

* First-level row
rec = Records.Add()
* ID row item
rec.AddItem(0)

* Checkbox row item
item = rec.AddItem("")
item.HasCheckBox = True

* Placeholder for +/-
item = Rec.AddItem("")

* The rest of the row items are added here

* Add children
recsub = rec.Childs.Add()
recsub.AddItem(0)

* Additional row items added here

* Add grandchild
gc = recsub.Childs.Add()

* Additional data here

Any ideas where I might be going wrong? Is there some additional property I need to set somewhere?



Replies:
Posted By: paulm_wlc
Date Posted: 30 April 2015 at 9:50am
Well this was dumb. I ended up setting up a really simplified version of the form in my app and everything worked great. After going back and forth between the sample form and my real form I suddenly realized my +/- column on my real form wasn't wide enough to display the +/- box for the grandchild; it was there I just couldn't see it. Duh. Widening that column fixed the issue.



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