sergiokml
6 years ago
Hello, it is my first time using the software and my English is not very good, I will try to explain myself.

I have a list of complex objects that I want to show in the grid. Some fields of the object will go in the first row and other fields in the second row, so for the whole list. Could you help me find the best solution?

Thank you

http://prntscr.com/odyii5 
Igor/10Tec
6 years ago
It's impossible to incorporate two tree columns into the same grid because the two parent nodes in the same row can have different child row sets in the general case.

Most likely, you need to find another representation for your data.
sergiokml
6 years ago
Originally Posted by: Igor/10Tec 

It's impossible to incorporate two tree columns into the same grid because the two parent nodes in the same row can have different child row sets in the general case.

Most likely, you need to find another representation for your data.



ok thank you, I've decided to remove the second tree so that the first tree shoots both secondary data. How would it be then?
Igor/10Tec
6 years ago
If you ask about a code snippet you can use as a basis for your development, you can find it in the electronic documentation and the iGrid manual in the PDF format. Find the Tree Functionality section - it describes the process of building trees in iGrid. Below is a part of the example:

// Var to reference the last added row
iGRow myRow;

// Create one column for our tree
iGrid1.Cols.Add("Tree", 200);

// Add the first root node
myRow = iGrid1.Rows.Add();
myRow.Level = 0;
myRow.TreeButton = iGTreeButtonState.Visible;
myRow.Cells[0].Value = "Root node";

// Add two child nodes to the root without nested items
myRow = iGrid1.Rows.Add();
myRow.Level = 1;
myRow.TreeButton = iGTreeButtonState.Hidden;
myRow.Cells[0].Value = "Child node 1";

myRow = iGrid1.Rows.Add();
myRow.Level = 1;
myRow.TreeButton = iGTreeButtonState.Hidden;
myRow.Cells[0].Value = "Child node 2";