private void FilterButton_Click(object sender, EventArgs e) { AgeGroupEventDataTable.Rows.Clear(); if (string.IsNullOrEmpty(EventComboBox.Text) || string.IsNullOrEmpty(AgeGroupComboBox.Text)) { MessageBox.Show("Please select an age group and an event.", "Notification", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } Enum.TryParse(EventComboBox.Text, out Event eventt); Enum.TryParse(AgeGroupComboBox.Text, out AgeGroup ageGroup); foreach (ChildNoEventsDTO c in Controller.GetChildrenNoEvents(eventt, ageGroup)) { AgeGroupEventDataTable.Rows.Add(c.Child.Name, c.Child.Age, c.NoEvents); } AgeGroupEventGridView.DataSource = AgeGroupEventDataTable; }