开发者

Adding Button to WPF DataGrid in runtime

开发者 https://www.devze.com 2023-02-03 21:09 出处:网络
I have a WPF application with WPF DataGrid. WPF DataGrid has attached itemsSource, which is List of CSVRecord class instances. CSVRecord is class with public items which are displayed in cells of data

I have a WPF application with WPF DataGrid. WPF DataGrid has attached itemsSource, which is List of CSVRecord class instances. CSVRecord is class with public items which are displayed in cells of datagrid. List is dynamically updated from separate thread (one item in record holds download progress of each file). I want to have the ability to add one e开发者_Python百科xtra column to DataGrid in runtime. This column should contain buttons to stop corresponding downloads. I know how to stop download or so, but

I havent managed and that is my question, how to add Button to particular cell of datagrid (in runtime from C#, no XAML) and when clicking on it, getting known exact row of datagrid.

0

精彩评论

暂无评论...
验证码 换一张
取 消