The only control on the usercontrol is a datagridview, that initially should have two columns and no data.
- When the user enters a value in a cell in the rightmost column, then a new, empty column should be added when the user hits enter or leaves this cell.
And that's it.
Can some one help me to find the right eventhandler for the datagridview (probably celledit or something), test that we are on the rightmost column, and then call
DataTable dt = (DataTable)this.dataGridView1.DataSource;
dt.Columns.Add("", typeof(double));
