Dev Express ButtonEdit 버튼 숨기기


How to disable or read only or hide ButtonEdit button in Dev Express



form 디자인 작업시

...으로 보이는 ButtonEdit버튼을 지워야 하는 경우가 있음.


When you design form, 

Sometimes you need disable or hiding ... button in column.


buttonEdit1.Properties.Button[0].Visible = false;


[C#] DateEdit Control 특정 날짜만 선택가능


DateEdit control 생성


-- 특정 날짜 이외에 disabled

private void dateEdit1_DrawItem(object sender, DevExpress.XtraEditors.Calendar.CustomDrawDayNumberCellEventArgs e) {

        

//매주 월요일만 가능 || 오늘 이전 회색

if(e.Date.DayOfWeek != DayOfWeek.Monday) || (e.Date < Date.Now.Date)) {

           e.Style.ForeColor = Color.Gray;

}

}

private void dateEdit1_EditValueChanging(object sender,DevExpress.XtraEditors.Controls.ChangingEventArgs e) {

       if(Convert.ToDateTime(e.NewValue,System.Globalization.CultureInfo.InvariantCulture).DayOfWeek != DayOfWeek.Monday) || 

   (Convert.ToDateTime(e.NewValue,System.Globalization.CultureInfo.InvariantCulture) < Date.Now.Date)) {

          e.Cancel = true;

}

}




+ Recent posts