본문 바로가기
300x250

전체 글722

DevExpress / Winform TextEdit Class TextEdit에 날짜, 시간 값에 서식 적용하기. TextEdit 컨트롤에 날짜 혹은 시간 값의 서식을 변경 할 수 있습니다. EditMask 값을 변경해주면 날짜 / 시간 출력 방법을 변경 할 수 있습니다. using System; using System.Windows.Forms; namespace WindowsFormsApp4 { public partial class Form1 : Form { #region Form1() /// /// 생성자 입니다. /// public Form1() { InitializeComponent(); CreateTextEdit(); } #endregion #region CreateTextEdit() /// /// 텍스트 에디트 컨트롤을 생성합니다. /// private void CreateTextEdit() { this... 2019. 4. 17.
DevExpress / Winform GridView에서 마우스 우클릭 시 달력을 출력하기. GridView에서 마우스 우클릭 했을 때 달력이 출력되도록 할 수 있습니다. 출력된 달력에서 날짜 변경 시 그 행의 날짜 입력 값이 변경됩니다. public partial class Form1 : Form { public Form1() { InitializeComponent(); this.gridView1.MouseDown += GridView1_MouseDown; this.gridControl1.DataSource = CreateTable(5); } #region GridView1_MouseDown(sender, e) /// /// 마우스 클릭 했을 때 동작합니다. /// /// 이벤트 발생자 입니다. /// 이벤트 인자 입니다. private void GridView1_MouseDown(object.. 2019. 4. 16.
DevExpress / Winform CheckedListBoxItem 컨트롤 추가하기. 여러개의 항목을 선택 및 해제 할 수 있는 CheckedListBoxItem컨트롤을 추가하는 방법 입니다. CheckedListBoxItem[] items = { new CheckedListBoxItem("January", false), new CheckedListBoxItem("February", false), new CheckedListBoxItem("March", true), new CheckedListBoxItem("April", false), new CheckedListBoxItem("May", false), new CheckedListBoxItem("June", true), new CheckedListBoxItem("July", true), new CheckedListBoxItem("Augus.. 2019. 4. 15.
DevExpress / Winform LookUpEdit 컨트롤에서 NULL 값에 텍스트 입력하기. LookUpEdit.Properties.NullText 를 통하여 Null 값을 나타내는 텍스트를 가져 오거나 설정할 수 있습니다. public class CityInfo { public int ID { get; set; } public string City { get; set; } public string Country { get; set; } public string Region { get; set; } } List Persons = new List(); List Cities = new List(); CreateData(); LookUpEdit lookUpEdit = new LookUpEdit(); lookUpEdit.Parent = this; lookUpEdit.Location = new Syste.. 2019. 4. 15.
DevExpress / Winform LookUpEdit 컨트롤 추가하기. LookUpEdit는 드롭 다운 방식으로 데이터를 조회 및 선택 할 수 있는 컨트롤 입니다. public class CityInfo { public int ID { get; set; } public string City { get; set; } public string Country { get; set; } public string Region { get; set; } } List Persons = new List(); List Cities = new List(); CreateData(); LookUpEdit lookUpEdit = new LookUpEdit(); lookUpEdit.Parent = this; lookUpEdit.Location = new System.Drawing.Point(198,78.. 2019. 4. 15.
DevExpress / Winform CheckEdit 컨트롤에서 Indeterminate 값 추가하기. CheckEdit 에는 기본적으로 체크(true) / 언체크(false) 를 출력 할 수 있습니다. 하지만 추가로 불확정(Indeterminate) 상태도 추가해 줄 수 있습니다. checkEdit5.Properties.AllowGrayed = true; 코드를 추가해줘야 합니다. 참고로 체크는 true 값에 해당하고 언체크는 false 값에 해당되며 불확정의 경우 null 값에 해당됩니다. Console.WriteLine( CheckEdit.EditValue ); 코드의 출력 값들을 확인해보면 Checked는 True, UnChecked는 False, Indeterminate는 빈 값을 출력해줍니다. private void CreateCheckEdit() { CheckEdit checkEdit1 = n.. 2019. 4. 14.
DevExpress / Winform CheckEdit 컨트롤 추가하기. Winform 의 CheckBox를 DevExpress 에서는 CheckEdit라고 하는데 CheckEdit를 추가하는 방법 입니다. 또한 마우스 클릭 이벤트로 체크 일때와 언체크 일때 콘솔을 출력하도록 하였습니다. private void CreateCheckEdit() { CheckEdit checkEdit1 = new CheckEdit(); checkEdit1.Properties.Caption = "Hide Button"; checkEdit1.Name = "checkEdit1"; checkEdit1.Location = new System.Drawing.Point(35,100); checkEdit1.Width = 100; checkEdit1.MouseDown += checkEdit1_MouseDown;.. 2019. 4. 14.
DevExpress / Winform GridView에서 특정 컬럼의 출력 내용을 변경하기(컬럼 FormatType 설정). 이전 글에서는 이벤트를 이용하여 GridView의 특정 컬럼의 출력 내용을 변경 하였습니다. 이번 글에서는 FormatType 설정하여 출력되는 값을 변경하는 내용입니다. 이전과 동일한 예시입니다. GridView에서 '사용여부'라는 컬럼의 값이 'Y'와 'N'으로 출력된다고 할 때 이 값을 '예' / '아니오' 라고 변경이 가능합니다. FormatType을 Custom으로 설정하고 FormatString이 Y일 때와 N일 때를 확인하여 출력 내용을 변경합니다. 추가로 클래스를 하나 작성해야 합니다. this.listGridView.Columns[2].DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom; this.listGridView.Colum.. 2019. 4. 12.
300x250