How to add new DataRow into DataTable?

后端 未结 8 1267
我在风中等你
我在风中等你 2021-02-02 06:48

I have a DataGridView binded to a DataTable (DataTable binded to database). I need to add a DataRow to the DataTable

8条回答
  •  日久生厌
    2021-02-02 07:02

    If need to copy from another table then need to copy structure first:

    DataTable copyDt = existentDt.Clone();
    copyDt.ImportRow(existentDt.Rows[0]);
    

提交回复
热议问题