更新时间:2023-12-01 10:09:58
您必须向datagridview添加某种数据源.然后将月份添加到此数据源的记录中.
例如:
创建一个bindingList,其中包含一个对象数组.这些对象代表您要显示的月份.
当您向该bindingList添加新对象时,该新对象的属性将显示在datagridview的列中.
You must add some sort of datasource to the datagridview. Then add the month to a record of this datasource.
for example:
create a bindingList which contains an array of objects. These objects represent the months you want to display.
When you add a new object to this bindingList, the properties of this new object will be shown in the columns of the datagridview.