Esempio n. 1
0
        private void FillRespondersDatagridview()
        {
            RespondersDAL dal = new RespondersDAL();

            // View the data from datagridview
            DataTable dt = dal.Select();

            respondersCustomControl1.dgvResponders.DataSource = dt;

            DataView dv = dt.DefaultView;

            dv.Sort = "IDNumber";
            DataTable sortedDT = dv.ToTable();

            respondersCustomControl1.dgvResponders.Columns[0].Visible  = false;
            respondersCustomControl1.dgvResponders.Columns[12].Visible = false;

            // Change Header Name of datagridview
            respondersCustomControl1.dgvResponders.Columns[1].HeaderText  = "ID Number";
            respondersCustomControl1.dgvResponders.Columns[10].HeaderText = "Birthdate (yyyy-MM-dd)";
        }