문제

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.

도움이 되었습니까?

해결책

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;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top