How can I export a GridView.DataSource to a datatable or dataset?

后端 未结 7 1146
心在旅途
心在旅途 2020-11-28 08:45

How can I export GridView.DataSource to datatable or dataset?

7条回答
  •  一整个雨季
    2020-11-28 09:06

    You should convert first DataSource in BindingSource, look example

    BindingSource bs = (BindingSource)dgrid.DataSource; // Se convierte el DataSource 
    DataTable tCxC = (DataTable) bs.DataSource;
    

    With the data of tCxC you can do anything.

提交回复
热议问题