I got an Entity that has a property that is ParentId. So the entity can have a paren.
How do you activate the ultragrid so it present the hierarchy. Now it's just listing all entity but not in a hierarchy.
I tried it with a dataset where there's is relation between the id and parentid .. so the grid shows up in a hierarchy ... but in my case its an entity ...
The hierarchy of the data structure is determined by the data source, not the grid. You would have to create a data source of some kind that returns a hierarchy of data. There's no way to specify a relationship or create child bands in the grid when none exists in the data source.
Use the desginer, click on Start on the grid, it should open the designer. Expand the Band and Column Settings. You should see a list of "Bands" each band will represent your collections. Band[0] is the columns for the your top level, Band[n] are for all collections.
So expand the appropriate band and go to Column Arrangement Overview. you'll be able from the hide, show, rename columns.
You could set the column.Hidden property to True for hiding individual columns, if you're not designing the child bands at design-time. The best place to do this would likely be in the InitializeLayout event of the grid.
-Matt
Thanks for the clarification.
But now that I have my hierarchy, I would like to know how to show only few properties of the child objects and not all properties.
For the top level grid rows, I can design the columns at design time and say
ultraGrid1.SetDataBinding(objectCollection, dataMember=null, hidenewcolumns=true, hidenewbands=false );
But what about the other hierarchy level objects, how can I show only the columns which i need?
Just to clarify the difference between MaxBandDepth and ViewStyle, these properties are not redundant. MaxBandDepth is useful in the case where you have a recursive relationship (i.e. a table refers to itself for a parent-child hierarchy) and you want to limit the depth of this relationship so that the grid doesn't create a large number of bands and cause the performance to suffer, or even just when the developer doesn't want to show the user that many bands because it serves no purpose for that particular application.
well, its nothing like that...
infragistics... has two properties to be set.. one is viewstyle=multiband and maxbanddepth = n, n > 1 thats it... the Genpro object collections do implement the IList interface, so what i gues and done making banbdepth change did everything....
well, from a developers pespective.. i think infragistic shud give only one property.. either maxbanddepth or viewstyle as multi band.. giving both actually confuses.. and i had to loop thru all properties...anyways.. problem solved ...