Search code examples
c#filterdatagridviewdatasourcebindingsource

How to retrieve the data source from a datagridview generated without a binding source C#?


I have a datagridview in my code. And I've added data to the datagridview through my program results.(without a data/binding source)

i.e dataGridView1.Rows.Add("var1", "var2", "var3");

How can I bring back the displayed data as data source of that datagridview?


Solution

  • I could write like.. dataTable.Rows.Add("var1", "var2", "var3");… for making data source