How can I copy a block of XML from one document to the other?

前端 未结 3 1293
耶瑟儿~
耶瑟儿~ 2021-01-16 04:54

I have two dataGridViews that load up an XML file each, I have made it so that you can drag and drop rows in between each of the grids. However at the moment, all that it do

3条回答
  •  半阙折子戏
    2021-01-16 05:12

    If your control is databound, you don't need to add/remove rows to the DataGridView's rows collection (you actually can't do this). Instead, add them to the underlying datasource collection (the collection you are setting in to the DataSource property of the DataGridView). Afterwards you'll need to refresh the view of both datagridviews to reflect the change.

提交回复
热议问题