본문 바로가기
300x250

C#/DevExpress58

DevExpress / Winform GridView 컬럼에 콤보 박스 추가하기. Gridview의 특정 컬럼에 콤보 박스를 추가 할 수 있습니다. 전역변수 작성란에 아래의 코드를 작성 후 private RepositoryItemComboBox genderComboBox; 폼 생성자 작성란에 아래의 코드를 추가해줍니다. this.genderComboBox = new RepositoryItemComboBox(); this.gridView.Columns[5].ColumnEdit = this.genderComboBox; InitializeComboBoxEdit(); InitializeComboBoxEdit 메서드 입니다. #region InitializeComboBoxEdit() /// /// 콤보 박스 에디트를 설정합니다. /// private void InitializeComboBoxE.. 2019. 5. 8.
DevExpress / Winform Gridview 생성 후 컬럼 생성 / 행 추가 / 행 삭제 하기. Gridview 생성 후 컬럼 생성 / 행 추가 / 행 삭제 하기 입니다. MemberModel.cs 입니다. /// /// 멤버 모델 클래스 입니다. /// public class MemberModel { #region ID /// /// 아이디를 가져오거나 설정합니다. /// public string ID{ get; set; } #endregion #region Name /// /// 이름을 가져오거나 설정합니다. /// public string Name{ get; set; } #endregion #region Email /// /// 이메일을 가져오거나 설정합니다. /// public string Email{ get; set; } #endregion } MainForm.cs 입니다. /// /// .. 2019. 5. 8.
DevExpress / Winform GridView 출력 시 빈 행 출력 안되게 하기. Gridview 출력 시 표시해둔것과 같이 빈 행이 출력 됩니다. this.gridView.OptionsView.NewItemRowPosition = NewItemRowPosition.None; 위의 코드 입력했을 경우 아래의 그림과 같이 빈 행이 출력되지 않습니다. 2019. 5. 7.
DevExpress / Winform GridControl의 DataSource에 객체를 바인딩 할 때 Column의 FieldName과 객체의 속성 값 맞추기. 객체를 GridControl의 DataSource에 바인딩 한 후 컬럼 생성 될때 컬럼의 FieldName과 객체의 속성 값이 일치 해야 GridView에 정상적으로 출력됩니다. FiledName과 일치 하지 않을 경우 출력될 때 빈칸으로 출력이 되는 상황이 발생합니다. 아래와 같은 속성들이 있을 때 각 컬럼의 FieldName과 속성들을 매칭한 코드 입니다. this.listGridView.Columns[0].FieldName = "ID"; this.listGridView.Columns[1].FieldName = "Subject"; this.listGridView.Columns[2].FieldName = "UseYN"; this.listGridView.Columns[3].FieldName = "Crea.. 2019. 4. 20.
300x250