Windows form application exception

前端 未结 3 419
眼角桃花
眼角桃花 2020-12-19 05:57

I get application exception

   at System.Windows.Forms.CurrencyManager.get_Item(Int32 index)
   at System.Windows.Forms.CurrencyManager.get_Current()
   at S         


        
3条回答
  •  再見小時候
    2020-12-19 06:20

    Following Andy's advice I substituted

    private List Employees { get; set; } = new List(); _employeesGridView.DataSource = Employees;

    with

    private BindingList Employees { get; set; } = new BindingList(); _employeesGridView.DataSource = Employees;

    and the problem disappeared.

提交回复
热议问题