DataTable.ImportRow is not adding rows

后端 未结 4 1794
我寻月下人不归
我寻月下人不归 2021-01-12 07:23

I\'m trying to make a DataTable and then add a couple rows to it. Here\'s my code:

using System;
using System.Collections.Generic;
using System.Linq;
using          


        
4条回答
  •  伪装坚强ぢ
    2021-01-12 07:59

    If the row is detached (as it is when it is first created) ImportRows fails silently (no exception) - to be able to import rows you have to Add it into the table. Afterwards you can import it into other tables.

提交回复
热议问题