Hello.
I have not done a lot with WinForms so I wonder if someone could give me a little assistance with this. I have a DataGridView that is bond to a IList<>. When I delete a selected record from the collection (ILIST<>) I get the following exception:
"System.IndexOutOfRangeException:Index 3 does not have a value"
I think my binding is a little lame too. So maybe someone can give me a pointer here as well.
public Form1()
{
InitializeComponent();
empGrid.DataSource = stub.GetAllEmplyees();
empGrid.Columns["FirstName"].Visible = true;
StatusStrip.Text = "Employee Administration";
}
What I would like to do is Delete a record and then refresh the DataGridGridView. What is the best way to define which properties you want to display in the columns?
Thanks a lot!