Show “No record found” message on a WPF DataGrid when it's empty

后端 未结 4 1684
陌清茗
陌清茗 2020-12-18 22:13

If there is no record available, I want to add a TextBlock on data grid, below the header, showing the message \"No Record Found.\"

Consider the attac

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-18 23:01

    1. Add the grid inside the stackpanel
    2. Place below border code next to datagrid
    
         
             
         
         
    
    

    It will show/hide based on your collection/list count.

提交回复
热议问题