Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
85
multiple bands
posted

Hello, 

I need to have 2 bands for my ultraWinGrid layout. In UltraGrid designer I added band[1] as a child for band[0]. I put ViewStyle property to MultiBand. But on InitializeLayout event I have only one band in e.Layout.Bands collection. What should I add in order to get the second band? (and I need to create the second band at design time, not at run time).

Thank you

 

Infragistics.Win.UltraWinGrid.UltraGridBand ultraGridBand1 = new Infragistics.Win.UltraWinGrid.UltraGridBand("Band 0", -1);

Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn1 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("Band 1");

Infragistics.Win.UltraWinGrid.UltraGridBand ultraGridBand2 = new Infragistics.Win.UltraWinGrid.UltraGridBand("Band 1", 0);

this.ugRC.DataSource = this.ultraDataSource1;

ultraGridBand1.Columns.AddRange(new object[ {ultraGridColumn1});

ultraGridBand2.MinRows = 1;

this.ugRC.DisplayLayout.BandsSerializer.Add(ultraGridBand1);

this.ugRC.DisplayLayout.BandsSerializer.Add(ultraGridBand2);

this.ugRC.DisplayLayout.Override.AllowAddNew = Infragistics.Win.UltraWinGrid.AllowAddNew.Yes;

this.ugRC.Name = "ugRC";

this.ugRC.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.ugRC_InitializeLayout);