| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| 31 |
Tags
- Column
- theme
- Gitea GPG
- 시놀로지깃티설치
- 젤리핀
- Header
- 깃티gpg
- DataGridView
- Re
- trayicon
- 트레이아이콘
- checkbox
- unable to boot the simulator
- 시놀로지
- CmdKey
- Resident
- gitea설치
- gitea
- gfd
- jellyfin
- toroisegit
- c#
- DataTable
- synology
- Gitea 설치
- 깃티
- 깃티설치
- LogonUI
- Resident Evil
- Capcom
Archives
- Today
- Total
C O D I N G
DataGridView의 Cell입력시 KeyPress / MaxLength 사용하기 본문
DataGridVeiw이벤트에 EditingControlShowing추가
e.Control.KeyPress이벤트 연결
KeyPress와 연결한 함수에서
if (((DataGridViewTextBoxEditingControl)sender).Text.Length >= 제한할 길이 수
&& ((DataGridViewTextBoxEditingControl)sender).SelectedText.Length <= 0)
e.Handled = true;
SelectedTextLength는 블록 지정했을때 수정이 가능하게끔 하기 위함
'Programming > C#' 카테고리의 다른 글
| DataGridview 컬럼헤더 체크박스를 눌렀을때 Sel, DeSel하기 (0) | 2016.12.01 |
|---|---|
| DataGridView컬럼헤더에 Checkbox넣기 (0) | 2016.12.01 |
| bool 배열 한번에 초기화 하기 (0) | 2016.11.23 |
| DataTable 사용방법 (0) | 2016.08.14 |
| ComboBox에 항목별로 Tag를 사용하는 방법 (DataTable) (0) | 2016.08.14 |