Hello I'm kind of new and am working on a kind of complicated idea so bear with me. What I want to do is to allow the end user to create a custom combo box with there own items at runtime. I have a column (in a sql data table named "TableAutoNoteVariable") for the "Name" for the combo box and I created 100 columns (in a different data table named "TableAutoNoteVariables") named 1-100 for the items in the combo box.


The basic form goes like this: at the beginning there is only one visible text box with a button to the side for the name of the combo box, after the adds text and clicks on the "add" button another text box appears along with another button for the items to "add". Here is where the problems begin. I want the user to be able to add a new item click the button add another item and click the button again. Each time the integer holding the column name goes one up in value. the problem is that each time the user clicks the "add item" button it add a new row to the whole table which de-syncs the "Name" column. my question is this:

is there a way to add a row only to one column at a time? Or is there a way to add a new row only the first time the user presses the "add item" button?



I'm adding the code for the "add item" click event



Code Snippetint collumn = 1;
private void buttonAddOptions_Click(object sender, EventArgs e)
{

string strCollumn = collumn.ToString();

int rowcount = autoNoteDataSet11.TableAutoNoteVariables.Rows.Count;

if (textBoxOptions.Text != "")
{

DataRow newRow = autoNoteDataSet11.TableAutoNoteVariables.NewRow();
newRow[strCollumn] = textBoxOptions.Text;
autoNoteDataSet11.TableAutoNoteVariables.Rows.Add(newRow);

//this is a sample combo box for the user to see what the combo box will look like
comboBox1.Visible = true;
comboBox1.Items.Add(autoNoteDataSet11.TableAutoNoteVariables[rowcount][strCollumn]);
textBoxOptions.Clear();
collumn++;
}
}



If some one has a different way to go about this please let me know!