private void button_ChangeStatus_Click(object sender, EventArgs e)
{
foreach (DataGridViewRow item in this.dataGridView1.SelectedRows)
{
BindingList<BugClass> bindingList = new BindingList<BugClass>();
bindingList = this.bindingSource.DataSource as BindingList<BugClass>;
bindingList[item.Index].Status = txtBox_StatusChange.Text;
}
}
i keep getting "Object reference not set to an instance of an object." I know this is because it's not initialized, however, it is initialized when here, showing that there is a an empty class:
BindingList<BugClass> bindingList = new BindingList<BugClass>();
then it becomes null as soon as the following line occurs:
bindingList = this.bindingSource.DataSource as BindingList<BugClass>;
Thanks for the help in advance