public void InsertColumn(List <ColumnInforModel> lstColumnInsert) { columnToShow = UtilityFunction.ReadColumnToShow(); foreach (var column in lstColumnInsert) { GridColumn gridColumn = new GridColumn(); gridColumn.Caption = column.Caption; gridColumn.FieldName = column.FieldName; gridColumn.Name = column.Name; gridColumn.Tag = column.Tag; gridColumn.Width = 100; gridColumn.Visible = column.Vissible; gridColumn.OptionsColumn.AllowEdit = column.AllowEdit; var checkedState = false; if (columnToShow == null) { } else if (columnToShow.Contains(column.FieldName)) { checkedState = true; } else { } m_CheckboxCombobox.Items.Add(new CheckComboBoxItem(column.Caption, checkedState, column.FieldName)); gridColumn.Visible = checkedState; m_GridView.Columns.Add(gridColumn); } m_GridView.FocusedRowHandle = GridControl.InvalidRowHandle; m_GridView.ClearSelection(); }