private void RadioButton5_CheckedChanged(object sender, EventArgs e) { if (radioButton5.Checked) { branchId = staff.BranchId; DataTable dt = ParcelController.GetAllDeliveredParcels(branchId); DataTable dt1 = new DataTable(); dt1 = dt.DefaultView.ToTable( true, "tracking_number", "delivered_date", "pieces", "weight", "date_created", "sender_name", "sender_phone", "receiver_name", "receiver_phone", "receiver_address", "receiver_location", "receiver_postcode"); dataGridView1.DataSource = dt1; dataGridView1.Columns["delivered_date"].DisplayIndex = 2; } }