WPF DataGrid: Blank Row Missing

后端 未结 7 652
春和景丽
春和景丽 2020-11-30 13:49

I am creating a WPF window with a DataGrid, and I want to show the blank \"new item\" row at the bottom of the grid that allows me to add a new item to the grid

7条回答
  •  借酒劲吻你
    2020-11-30 14:27

    Vincent Sibal posted an article describing what is required for adding new rows to a DataGrid. There are quite a few possibilities, and most of this depends on the type of collection you're using for SelectedProject.Tasks.

    I would recommend making sure that "Tasks" is not a read only collection, and that it supports one of the required interfaces (mentioned in the previous link) to allow new items to be added correctly with DataGrid.

提交回复
热议问题