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.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;
ultraGridBand2.MinRows = 1;
this.ugRC.DisplayLayout.BandsSerializer.Add(ultraGridBand2);
this.ugRC.DisplayLayout.Override.AllowAddNew = Infragistics.Win.UltraWinGrid.AllowAddNew.Yes;
this.ugRC.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.ugRC_InitializeLayout);
You cannot add bands to the grid. The grid bands come from the data source. The BandSerializer is intended for internal use by the grid only, you should never use this class in your code.
If you are using an UltraDataSource, then you should be adding the bands and setting up the column in the UltraDataSource and then just bind it to the grid.
Thank you for the answer. Could you refer me to some example how to do this? Thanks.