void InitializeColumns()
        {
            int bandIndex = 0;
            var bandCol   = new GridColumn {
                FieldName = "MyBand"
            };

            BandedViewBehavior.SetRow(bandCol, 0);
            BandedViewBehavior.SetColumn(bandCol, bandIndex * 2);
            BandedViewBehavior.SetColumnSpan(bandCol, 2);
            BandedViewBehavior.SetIsBand(bandCol, true);
            grid.Columns.Add(bandCol);

            var col1 = new GridColumn {
                FieldName = "First"
            };

            BandedViewBehavior.SetRow(col1, 1);
            BandedViewBehavior.SetColumn(col1, bandIndex * 2);
            grid.Columns.Add(col1);

            var col2 = new GridColumn {
                FieldName = "Second"
            };

            BandedViewBehavior.SetRow(col2, 1);
            BandedViewBehavior.SetColumn(col2, bandIndex * 2 + 1);
            grid.Columns.Add(col2);
        }
 void CrearColumn(GridColumn c)
 {
     BandedViewBehavior.SetRow(c, 0);
     BandedViewBehavior.SetColumn(c, 0);
     BandedViewBehavior.SetRowSpan(c, 0);
     BandedViewBehavior.SetColumnSpan(c, 0);
     BandedViewBehavior.SetIsBand(c, false);
     c.Visible = false;
 }
        BandedViewBehavior CreateBehavior()
        {
            BandedViewBehavior behavior = new BandedViewBehavior();

            behavior.ColumnDefinitions.Add(CreateGridColumnDefinition());
            behavior.ColumnDefinitions.Add(CreateGridColumnDefinition());
            behavior.RowDefinitions.Add(CreateGridRowDefinition());
            behavior.RowDefinitions.Add(CreateGridRowDefinition());
            behavior.TemplatesContainer = new TemplatesContainer();
            return(behavior);
        }
Exemplo n.º 4
0
		public void Initialize(ColumnsLayoutControl owner) {
			Owner = owner;
			BandBehavior = Owner.BandBehavior;
			View = (TableView)Owner.View;
		}