简体   繁体   中英

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)

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM