| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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
- Gitea 설치
- 젤리핀
- theme
- Gitea GPG
- 트레이아이콘
- LogonUI
- unable to boot the simulator
- DataGridView
- toroisegit
- gfd
- jellyfin
- trayicon
- gitea설치
- Re
- c#
- Capcom
- checkbox
- Resident Evil
- 시놀로지
- Resident
- 깃티
- gitea
- Column
- CmdKey
- DataTable
- Header
- 시놀로지깃티설치
- 깃티설치
- 깃티gpg
- synology
Archives
- Today
- Total
목록checkbox (2)
C O D I N G
DataGridview 컬럼헤더 체크박스를 눌렀을때 Sel, DeSel하기
컬럼헤더에 체크박스를 추가하고, 이벤트를 추가했다면체크박스 이벤트에foreach (DataGridViewRow dgvRow in 그리드뷰네임.Rows){ dgvRow.Cells["헤더네임"].Value = ((CheckBox)sender).Checked;} 하게되면 선택한 경우 SelectAll또는 DeSelectAll이 된다 하지만, 체크박스에 EditBegin상태가 유지되고있다면체크값이 변하지 않는다. 그리드뷰네임.EndEdit(); EndEdit를 해서 Edit모드를 종료 한 후 위 코드를 사용하면 정상적으로모든 체크박스가 바뀐다.
Programming/C#
2016. 12. 1. 13:10
DataGridView컬럼헤더에 Checkbox넣기
DataGridView의 이벤트중 CellPainting 나 Load이벤트에 if (e.ColumnIndex == 0 && e.RowIndex == -1) { e.PaintBackground(e.ClipBounds, false); Point pt = e.CellBounds.Location;the cell int nChkBoxWidth = 15; int nChkBoxHeight = 15; int offsetx = (e.CellBounds.Width - nChkBoxWidth) / 2; int offsety = (e.CellBounds.Height - nChkBoxHeight) / 2; pt.X += offsetx; pt.Y += offsety; CheckBox cb = new CheckBox(); cb.S..
Programming/C#
2016. 12. 1. 13:05
