I created columns in the grid, manually added lines to the same.
dataGridView1.Rows.Add(...) Now I want to bind the data from the datagridview to datatable , but the datagridview.datasource shows null .. Although there is data in the grid.
Do you want to "merge data" from a GridView into a table or what? Null in the datasource , because nothing was originally specified as the source. By clicking the button in the handler:
DataTable and form a structure as in a grid.GridView and write the column data to the newly formed DataTable .DataTable .Although it seems like everyone else is doing the opposite :)
Source: https://ru.stackoverflow.com/questions/280935/
All Articles