Beispiel #1
0
        private void Form2_Load(object sender, EventArgs e)
        {
            //데이터 그리드뷰 설정
            CommonUtil1.SetInitGridView(dgvMember);

            CommonUtil1.AddGridTextColumn(dgvMember, "회원ID", "userID");
            CommonUtil1.AddGridTextColumn(dgvMember, "회원명", "userName", 150);
            CommonUtil1.AddGridTextColumn(dgvMember, "비밀번호", "userPwd", 120);

            //등록된 데이터 목록 조회
            DataRetrieve();
        }
Beispiel #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            dataGridView1.AutoGenerateColumns = false;
            dataGridView1.AllowUserToAddRows  = false;

            dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
            dataGridView1.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            dataGridView1.ColumnHeadersHeight = 30;

            //DataGridViewTextBoxColumn col1 = new DataGridViewTextBoxColumn();
            //col1.HeaderText = "사원번호";
            //col1.DataPropertyName = "emp_no";
            //col1.Width = 100;
            //col1.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            //dataGridView1.Columns.Add(col1);

            CommonUtil1.AddGridTextColumn(dataGridView1, "사번", "emp_no", 100, true, DataGridViewContentAlignment.MiddleCenter);
            CommonUtil1.AddGridTextColumn(dataGridView1, "사원명", "emp_name", 250);
            CommonUtil1.AddGridTextColumn(dataGridView1, "부서", "dept_no", 100, false, DataGridViewContentAlignment.MiddleCenter);
            CommonUtil1.AddGridTextColumn(dataGridView1, "부서명", "dept_name", 200);
        }