开发者

Last row in WPF datagrid binded to a different collection

开发者 https://www.devze.com 2023-02-16 22:32 出处:网络
I have an ObservableCollection A binded to a DataGrid in WPF. The user can add, remove and edit rows and this work fine.

I have an ObservableCollection A binded to a DataGrid in WPF. The user can add, remove and edit rows and this work fine.

I would like to add an 'additional row' in the end of a DataGrid, serving as a 'summary' for a given column. This row would be binded to a completly other collection B. We can assume that number of columns in DataGrid is equal to number of elements in B.

It doesn't have to be one control - I would like to make it LOOK LIKE one. Especially, when user resizes columns, the "last row" resizes accordingly.开发者_如何学JAVA Secondly, this row is always in the very end.

Any ideas how to achieve such a thing? Thanks!


One solution would be to use a MultiBinding.

0

精彩评论

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

关注公众号