Reputation: 81
In DevExpress XtraGrid an Empty Bands is displayed when one of its column position is set Fixed. Here is the code:
gridview1.DataSource = ds.Table[0];
gridview1.OptionsView.ColumnAutoWidth = false;
gridview1.PopulateColumns();
GridBand DateGridBand = new GridBand();
DateGridBand.Columns.Add(gridview1.Columns["Date"]);
gridview1.Bands.Add(DateGridBand).Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Left;
GridBand gdBand = new GridBand();
gdBand .Caption = "Details";
gdBand .Columns.Add(gridview1.Columns["No"]);
gdBand .Columns.Add(gridview1.Columns["Qty");
gridview1.Bands.Add(gdBand );
how to avoid the Blank Bands.
Thanks.
Upvotes: 0
Views: 916
Reputation: 5605
You need to remove the header row.
// remove header row
GridView1.OptionsView.ShowColumnHeaders = False;
Knowing the two below will save you some time with further customization.
// remove side indicator
GridView1.OptionsView.ShowIndicator = False;
// remove group header
GridView1.OptionsView.ShowGroupPanel = False;
Upvotes: 2