Hello!
In my windows form i have to create table (at runtime) of specified by the user name (in textbox) and then use this table as datasource of dataGridView. Finally, filled table must be inserted into database. I tried to solve this problem in two ways:
1)I have created dataTable, specified its columns etc. but I couldn't insert dataTable into database, even using SqlDataAdapter.Update() - propably I misused dataAdapter. I'm working with C# for 1 week and I don't fully understand idea of datasets, tableadapters etc. ;)
So I decided to use SQL commands:
2)Using ExecuteNonQuery() I've created table in my database, then I recognized, that I have to use magic SqlDataAdapter and i gave up....
I want to manage content of DataGridView in the same way, as in the case of datatable added to dataset using configuration wizard.
I know, that I can skip dataGridView, create list of textboxes, button expanding this list, and funcion inserting all fields into my table after confirmation button, but my supervisor expects dataGridView...
I can't paste the code here, because I left only copy of sourcecode on company computer. If it will be necessary I will paste here my code tomorrow.
Thank You for any help!