DataGridView3 DataGridView 컬럼 폰트 설정 폰트 설정 // Century Gothic Font DataGridView.ColumnHeadersDefaultCellStyle.Font = new Font("Century Gothic", 9F, FontStyle.Bold); // Marlett Font DataGridView.ColumnHeadersDefaultCellStyle.Font = new Font("Marlett", 8, FontStyle.Regular); 2020. 12. 11. Datagridview 컬럼 정렬 막기 데이터그리드뷰의 컬럼의 정렬 기능은 유용하지만 특정 컬럼은 정렬 기능을 막아야 하는 경우가 있다. // 전체 컬럼의 Sorting 기능 차단 foreach (DataGridViewColumn item in DataGridView.Columns) { item.SortMode = DataGridViewColumnSortMode.NotSortable; } // 특정 컬럼의 정렬 기능 활성화 DataGridView.Columns[0].SortMode = DataGridViewColumnSortMode.Automatic; 2020. 12. 4. DataGridView 포커스 이동 DataGridView 컨트롤에서 포커스 이동 구현 UP, DN 버튼 클릭시 아래 위로 포커스 이동하도록 하였다. private void BTN_DOWN_Click(object sender, EventArgs e) { int iSelRow = 0; iSelRow = DataGridView.SelectedCells[0].RowIndex; if (iSelRow == kryptonDataGridView.Rows.Count - 1) return; DataGridView.CurrentCell = DataGridView.Rows[iSelRow+1].Cells[0]; } private void BTN_UP_Click(object sender, EventArgs e) { int iSelRow = 0; iSelRow =.. 2020. 11. 25. 이전 1 다음 728x90