Hi Staff.
I have a simple DataSet with two tables, and this DataSet is the DataSource of my Grid.
What i obtain is a Hierarchical Grid. It works fine but i always manually define the schema.
I created Bands 0 and his Child, Bands 1.
Columns in Bands 0 works fine (i mean, i can change property correctly), but what i edit in Bands 1 (whatever property, column caption for example), nothing change.
If i try to change this by code behind, it works.
Why?
Is it possible manually define a schema for Hierarchical Grid?
Another and last question: Column 1 on Bands 1 has the same width of Column 1 of Bands 0.
this happens for all the columns.
Is it possible define different widths for Bands 1?
Hello Luciano,
Thank you for contacting Infragistics!
This behavior is likely occurring because the name/key of your Band 1 does not match what is in the data source. The reason Band 0 works as since it is the parent level it doesn’t have the requirement of having to match those. You will want to make sure what you have in the schema matches your data source (not that for the key you may have to use the data relation).
As for setting column width each column has its own width property. After defining the schema under the basic settings in the designer. Expand out the Band and Column Settings. There you will be able to define widths on the columns in Band 1.
Hi Mike!.
Thank you for reply.
I checked: the columns in Band 1 are the same of my DataSource.
I also tried to change the key of Band 1 with the name of the data relation, but nothing change.
Why still not match?
Instead about columns width i solved the issue thanks your advise: i forgot to change the property "AllowColSizing" in "AllowColSizing.Free".
I have further information on column sizing. The columns in each band have their widths synchronized by default. Setting the width of column 0 in Band 0 will automatically synchronize the width of column 0 in Band 1. To let them have different widths you can do the following:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { var layout = e.Layout; var ov = layout.Override; ov.AllowColSizing = AllowColSizing.Free; }