How can I clear rows in DataGridView with C#?

后端 未结 13 2245
野的像风
野的像风 2020-12-03 18:19

Following Error in this line.

datagridview1.Rows.Clear()

but this line gives error:

Cannot clear this list.

13条回答
  •  盖世英雄少女心
    2020-12-03 18:41

    Since you are using a bound grid, have you tried to call your loading function twice and verified that the data is not doubling?

    Since it is bound, loading twice ought to not duplicate the data.

    http://www.vbforums.com/showpost.php?s=aa5f116586c00a2d9ea15e3727fc5c2f&p=2841192&postcount=9

提交回复
热议问题