728x90

공부/Devexpress 3

[Devexpress Winform, c#] XtraMessageBox 버튼 텍스트 변경하기

Devexpress에서 기본 제공하는 버튼은 기본 영어로 나온다. 버튼의 글자를 변경하기 위해 직접 접근할 수는 없지만XtraMessageBoxArgs를 매개변수로 하는 show 함수를 이용해 showing 이벤트에서 버튼의 텍스트를 바꿔치기 할 수 있다.다국어를 위한 리소스 등을 이용해서 적용할 수도 있다. public static class CustomXtraMessageBox{ static XtraMessageBoxArgs getArgs(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon) { XtraMessageBoxArgs args = new XtraMessageBoxArgs(); ..

공부/Devexpress 2025.01.14

[Devexpress Winform] 스프레드 시트 컨트롤 셀 대상 바꾸기 메세지박스 가로채기

Devexpress 의 SpreadsheetControl에서 셀 영역을 드래그해서 다른 셀에 드롭할 때, 두 영역 모두 값이 있었다면 "Do you want to replace the contents of the destination cells?" 라는 메세지 박스가 나오고 확인을 누르면 셀 대상 바꾸기가 된다. 문제는 이 기능이 Devexpress 라이브러리 내부에서 넣은 기능이라 외부에서 컨트롤할 수 없다.다행히 ReplaceService 함수를 통해 해당 기능을 중간에 가져올 수 있다고 한다.  how to intercept the spreadsheets control "Do you want to replace the contents of the destination cells?" message ?..

공부/Devexpress 2025.01.06

[Devexpress Winform] GridView 에서 ValidatingEditor 이벤트때 변경 전 데이터 가져오기

GridView의 ValidatingEditor 이벤트에 있는 BaseContainerValidateEditorEventArgs에서는  변경된 후의 데이터만 가져올 수 있다. 이럴때는 GridView 인스턴스에서 ActiveEditor의 OldEditValue를 가져온다. 예를 들어, GridView gridView 가 있을 때,ValidatingEditor 이벤트 발생시변한 값이 변경 전 값과 같을 때 다른 작업을 하거나 넘길 수 있다.  gridView.ValidatingEditor += (s, e) => { string name = e.Value as string; if (gridView_Lamp.FocusedColumn.FieldName == "Validate할 column 필드이름..

공부/Devexpress 2025.01.05
반응형