I am programming in C#. The program is about rows for a student associated with. I have list of student names and I am going to use only one student iD and print all of its grades in Data grid View. I am not able to do that and it's just showing me all student grades. All I need is printing specifically only grades of a student.

```
   private BindingList<StudentGrade> _studentGrade = new BindingList<StudentGrade>();

    public frmGrades(int studentID)
    {
        InitializeComponent();
        loadItemsFromFiles();

        dgvGrades.DataSource = _studentGrade;

        string id = studentID.ToString();

        for (int z = 0; z < dgvGrades.Rows.Count;z++)
        {
            if (!dgvGrades.Rows[z].Cells["StudentID"].Value.ToString().Equals(id))
            {
                dgvGrades.Rows.RemoveAt(z);
                z--;
                dgvGrades.Refresh();
            }

        }

    }

```