C# DataGridView not updated when datasource is changed

前端 未结 4 664
星月不相逢
星月不相逢 2020-12-31 04:12

I have a list of object

List results;

so i added the list to the datagridview

dataGridView.DataSource =         


        
4条回答
  •  盖世英雄少女心
    2020-12-31 04:54

    One easy way is to use new BindingSource(object dataSource, "")

    This will update the binding source and thus will update the table

    For example:

    dataGridView.DataSource = new BindingSource(phase3Results, "");

提交回复
热议问题