We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Accessing ChildTableDescriptor In Hierarchical Dataset Defined in Code

I have a hierarchy of three tables defined in code (the setup is pretty much identical to the 1.1 HierarchyInCode example, although I''m doing this under the .Net 2.0 framework... not sure if that matters...) I need to be able to define things like the "VisibleColumns" collection for both the child and grandchild tables, but I''m having trouble figuring out how to access them. The KB article "I am displaying Hierarchial data. How can I access the ChildTableDescriptor" seems to show almost exactly what I need, and I''m able to use the example code to modify certain properties of my child table (like column names, as in the example) but manipulating the VisibleColumns collection doesn''t seem to work. Based on the example, I''m using a line like the following to try to add a member to the collection: CType (Me.GridGroupingControl1.TableDescriptor.Relations(0).ChildTableDescriptor, GridTableDescriptor).VisibleColumns.Add("milestoneName") Is this even close? Also, just curious: Is it possible in this situation to instead set up the child and grandchild TableDescriptors using the designer, defining things like VisibleColumns there? I''ve set the "GridRelationDescriptor.Name" property on both of my relations in code, thinking there might be a chance that by setting up identical relations in the designer and making the names match up, whatever settings I defined in HTML via the designer would be applied at runtime... Doesn''t seem to work...

3 Replies

AS Alan Silverman September 19, 2005 02:52 PM UTC

Update to below: I''ve got the VisibleColumns in child tables figured out -- I''m still wondering about the possibility of using inline tabledescriptor information in this situation, though.


AD Administrator Syncfusion Team September 19, 2005 06:33 PM UTC

Hi Alan 1) We are working on a datasource control to provide Designer Support for hierarchial data sources in Whidbey. 2) I followed up with the Grid team on this and the correct way to do this would be via code. (I assume you are referring to setting up hierarchial data via code and have the ability to make changes via the Designer. ) Regards Arun


AS Alan Silverman September 20, 2005 05:04 PM UTC

Thanks Arun. I''ve got more questions now but I''ll make a seperate post, as they''re not really related.

Loader.
Live Chat Icon For mobile
Up arrow icon