public void ViewIncomingParcel() { branchId = staff.BranchId; list = RouteController.GetRoutesForBranch(branchId); for (int i = 0; i < list.Count; i++) { if (comboBox2.SelectedIndex == i) { DataTable dt = ParcelController.GetAllIncomingParcels(branchId, list[i].Id); DataTable dt1 = new DataTable(); dt1 = dt.DefaultView.ToTable( true, "tracking_number", "plate_number", "pieces", "weight", "date_created", "sender_name", "sender_phone", "receiver_name", "receiver_phone", "receiver_address", "receiver_location", "receiver_postcode"); dataGridView1.DataSource = dt1; dataGridView1.Columns["plate_number"].DisplayIndex = 2; } } }