Using a list as a data source for DataGridView

前端 未结 3 1617
迷失自我
迷失自我 2020-11-30 05:50

I\'ve extracted the setting names and their respective values out of a configuration file into an ordered dictionary. The dictionary contains keys and values which are of th

3条回答
  •  余生分开走
    2020-11-30 06:10

    this Func may help you . it add every list object to grid view

    private void show_data()
            {
                BindingSource Source = new BindingSource();
    
                for (int i = 0; i < CC.Contects.Count; i++)
                {
                    Source.Add(CC.Contects.ElementAt(i));
                };
    
    
                Data_View.DataSource = Source;
    
            }
    

    I write this for simple database app

提交回复
热议问题