Home › Forums › WinForms controls › Xceed Grid for WinForms › Cannot hide DetailGrid columns.
I have a Master/DetailGrid wich populates fine with a dataset,but when i should hide columns in the detail grids they will not hide.
Anybody having a clue about this?
———————————–// Hide MasterGrid Columns. // Hiding this column works fine!this.MasterGrid.Columns[“Col1”].Visible = false;
// Hide DetailGrid1 Columns.// This column will not hide!this.DetailGrid1.Columns[“Col1”].Visible = false;
// Hide DetailGrid2 Columns.// These columns will not hide!this.DetailGrid2.Columns[“Col1”].Visible = false;this.DetailGrid2.Columns[“Col2”].Visible = false;———————————
Imported from legacy forums. Posted by Benny (had 3259 views)
I had the same problem and solved it by doing it the following way. Not sure if there is a better way as I have just started evaluating the grid for our company.
this.DetailGridTemplates.Item(0).Columns(“Col1”).Visible = False
Imported from legacy forums. Posted by DGamblin (had 331 views)
Don’t use DetailGridTemplates.Instead access a detailGrid directly:
this.gridControl1.DataRows.DetailGrids.Columns[“Col1”].Visible = false;
Imported from legacy forums. Posted by C# (had 223 views)
Thank you, now it’s working fine. 😀
Imported from legacy forums. Posted by Benny (had 4167 views)