예제 #1
0
        /// <summary>
        /// 그리드뷰 컬럼 생성 메서드
        /// </summary>
        private void DataGridViewColumnSet()
        {
            //데이터그리드뷰 초기설정

            //관리자 검색
            DataGridViewUtil.InitSettingGridView(dgvUsers);
            DataGridViewUtil.AddNewColumnToDataGridView(dgvUsers, "관리자 ID", "MANAGER_ID", true, 100);
            DataGridViewUtil.AddNewColumnToDataGridView(dgvUsers, "이름", "MANAGER_NAME", true, 100);
            DataGridViewUtil.AddNewColumnToDataGridView(dgvUsers, "부서", "MANAGER_DEP", true, 80);
            DataGridViewUtil.DataGridViewBtnSet("  ", "설정", dgvUsers, 0, 0);
            dgvUsers.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            //권한 설정
            DataGridViewUtil.InitSettingGridView(dgvRight);
            DataGridViewUtil.AddNewColumnToDataGridView(dgvRight, "메뉴ID", "MENU_ID", false, 100);
            DataGridViewUtil.AddNewColumnToDataGridView(dgvRight, "메뉴명", "MENU_NAME", true, 150);
            DataGridViewUtil.DataGridViewCheckBoxSet(dgvRight, "A", "등록", 100);
            DataGridViewUtil.DataGridViewCheckBoxSet(dgvRight, "B", "읽기", 100);
            DataGridViewUtil.DataGridViewCheckBoxSet(dgvRight, "C", "수정", 100);
            DataGridViewUtil.DataGridViewCheckBoxSet(dgvRight, "D", "삭제", 100);
            DataGridViewUtil.DataGridViewCheckBoxSet(dgvRight, "E", "인쇄", 100);
            DataGridViewUtil.DataGridViewCheckBoxSet(dgvRight, "F", "리셋", 100);
            DataGridViewColumn col = this.dgvRight.Columns[1];

            col.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
            dgvRight.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            DataGridViewCheckBoxAllCheck();


            //그룹 설정
            DataGridViewUtil.InitSettingGridView(dgvGroup);
            DataGridViewUtil.DataGridViewCheckBoxSet(dgvGroup, "    ");
            DataGridViewUtil.AddNewColumnToDataGridView(dgvGroup, "그룹코드", "RIGHT_ID", false, 100);
            DataGridViewUtil.AddNewColumnToDataGridView(dgvGroup, "그룹", "RIGHT_GROUP", true, 100);
            DataGridViewUtil.AddNewColumnToDataGridView(dgvGroup, "그룹명", "RIGHT_NAME", true, 150);
            DataGridViewUtil.AddNewColumnToDataGridView(dgvGroup, "상세설명", "RIGHT_DESC", true, 300);
            DataGridViewUtil.AddNewColumnToDataGridView(dgvGroup, "1", "RIGHT_USE", false, 100);
            DataGridViewUtil.AddNewColumnToDataGridView(dgvGroup, "1", "RIGHT_FIRST_MDFR", false, 100);
            DataGridViewUtil.AddNewColumnToDataGridView(dgvGroup, "1", "RIGHT_FIRST_MDFY", false, 150);
            DataGridViewUtil.AddNewColumnToDataGridView(dgvGroup, "1", "RIGHT_LAST_MDFR", false, 300);
            DataGridViewUtil.AddNewColumnToDataGridView(dgvGroup, "1", "RIGHT_LAST_MDFY", false, 300);
            col = this.dgvGroup.Columns[1];
            col.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
            dgvGroup.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;

            DataGridViewCheckBox();
        }