본문 바로가기
300x250

winform79

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.
C# / Winform 텍스트 박스의 값이 입력 안되었을 경우 메시지 박스 출력하기.(유효성 검사) 텍스트 박스의 값이 없거나 혹은 NULL 일 경우 메시지 박스를 호출하고 리턴해줄수 있습니다. #region CheckTextEdit(textEdit, mandatory, inputValue, labelName) /// /// 텍스트 에디트를 검사합니다. /// /// 텍스트 박스 입니다. /// 필수 여부 입니다. /// 입력 값 입니다. /// 라벨 이름 입니다. /// 유효성 여부를 리턴합니다. private bool CheckTextEdit(TextBox textBox, bool mandatory, string inputValue, string labelName) { if(mandatory) { if(string.IsNullOrEmpty(inputValue)) { MessageBox.Show($".. 2019. 5. 7.
DevExpress / Winform GridView 출력 시 빈 행 출력 안되게 하기. Gridview 출력 시 표시해둔것과 같이 빈 행이 출력 됩니다. this.gridView.OptionsView.NewItemRowPosition = NewItemRowPosition.None; 위의 코드 입력했을 경우 아래의 그림과 같이 빈 행이 출력되지 않습니다. 2019. 5. 7.
C# / Winform TreeView TreeView의 항목을 체크박스로 변경 및 체크된 항목 삭제하기. this.treeView.CheckBoxes = true; 를 작성하면 TreeView에 출력되는 노드를 체크박스로 변경할 수 있습니다. SelectedNode.Remove()를 사용하여 여러개의 노드를 체크 후 삭제 시도 시 에러 발생합니다. 여러개 항목을 체크 후 삭제 할 때는 별도의 코드를 작성해야 합니다. private List checkedNodes = new List(); #region Form1() /// /// 생성자 입니다. /// public Form1() { InitializeComponent(); this.addButton.Click += addButton_Click; this.deleteButton.Click += deleteButton_Click; this.deleteAllBut.. 2019. 4. 21.
300x250