Hi there,
we are to display a very complex data on the screen for view and edit purpose.What we actually need, is a tree control, where every children, even siblings can be a different(!) grid. So all children and siblings and nodes are independent each other, not sharing anything, but containing a control (what we need is a UltraGrid)Of course all cells must be editable, columns resizable, etc - just like any normal nonembedded UltaGrid
I know that Tree can display a grid by playing with the ColumnSettings, but -AFAIK- it forces the siblings to share the same headers across the same level.
My question, does IG Tree control supports this kind of view, if so, how to achieve this in general?Thank you in advance.
We need something like this (mspaint made image)
Browsing the samples, I found the UltraTree > FreeForm View Style > Animals (XML) pretty similar what we need.
However, here, is it possible to add more rows to the same grid? As UltraTreeNode has Cell property, but not Rows. So I can only change the only row values?I tried to add a new sibling to the Node, and use the same ColumnSet, but it did not merged to the same Grid, but created a new one with same columns with 1 row again.What we need is, see pic:
Hello pxclient,
I suggest you to start again on a clean project. I have created such project for you, so please take a look at it and let me know if you have any questions.
Hi Boris,
thanks your reply, but this is not what we need. This is just a simple DataTable assigned to the IG tree.
We need is to be able to add IG Grids as children to any nodes in the tree. These grids are totally independent from each other, do not share header, nothing, just a grids in the tree nodes.Please see my tree_with_grid.png first attached image (which has been created by mspaint as I could not find a way to reach this yet with IG)I am attaching a project, which is made from your demo. Please start, go to 2nd tab (XML), expand all, and you will see that the lowest children 'xxx' and 'yyy' are in different 1 row grid. I would like them to be in the same grid, but with 2 rows.
Thanks for any further help
Hi,
Thank you for your feedback.
I am not able to understand why you are using this sample, but your post was very helpful. It is an example, complicated and I personally think that starting from scratch would be better. The reason behind the different rows is that in this sample, we are creating a new columnset each and every time we ecounter a node. You could see that there are 3 nested foreaches doing that thing for you. If you add antoher line, after that one:
UltraTreeNode animalNode = categoryNode.Nodes.Add(null, animalElement.Name);
and add:
categoryNode.Nodes.Add(null, animalElement.Name);
you would see that you would have two records.
If you feel that I misunderstood you, please let me know, I will be glad to assist you further on this.
Thanks Boris,
I tried what you said, but the result is not what we need (or I did something wrong):-Adding a new sibling node with the same columnset just creates a new sibling grid (top left image)-Not specifying the columnset will just add an ordinary node (top right image)
Please download my sample project added to my prev comment, and in Form1.cs [ line: 623] I tried to achieve what you said.
See the attached screenshot as result.
Could you provide tips based on this sample?
ps: I chose this as starting point, as this is 90% ready, only the last (but important) 10% needs to be finished.
Could you please review the sample attached to this post and see if it meets your requirements. Please feel free to let me know if I misunderstood you or if you have any other questions.
Thanks your reply. Ok, it can be a start. Now I am attaching a handmade-screenshot.In this, I am adding a new grid as a sibling grid of the first one, with different columns.This is what we need, as second step.Please let me know, how to achieve this?Thank you.
Have you considered using the WinGrid instead of the WinTree? You could achieve this with the grid, except for the root node you have here. In the grid the "Animals" row would have to be a a row with cells, not just a node like you have here. But you could have a root band with a single column and hide the column headers so it would look pretty similar.
Thanks Mike, that's what I was afraid of...
There is no way to do this. The tree does not support it. The only way you could do something like this would be to have two parent nodes and then have the child node (grids) each be under a separate parent node.