C# grid DataSource polymorphism

前端 未结 7 1713
我在风中等你
我在风中等你 2021-01-06 06:28

I have a grid, and I\'m setting the DataSource to a List. What I want is to have the list bind to the underlying type, and disply

7条回答
  •  北荒
    北荒 (楼主)
    2021-01-06 06:51

    If you are willing to use a ListView based solution, the data-bindable version ObjectListView will let you do this. It reads the exposed properties of the DataSource and creates columns to show each property. You can combine it with BindingListView.

    It also looks nicer than a grid :)

提交回复
热议问题