How to raise an event when DataGrid.ItemsSource is changed

前端 未结 3 1320
陌清茗
陌清茗 2020-12-05 02:39

I am new in WPF, and I am working with DataGrids and I need to know when the property ItemsSource is changed.

For example, I would need that when this instruction is

3条回答
  •  盖世英雄少女心
    2020-12-05 02:54

    If you wnat to detect new row added can try DataGrid's InitializingNewItem or AddingNewItem Event.

    InitializingNewItem usage :

    Datagrid auto add item with data of parent

提交回复
热议问题