开发者

C# Datagrid multiple columns to one column

开发者 https://www.devze.com 2023-02-05 03:42 出处:网络
I am using开发者_开发技巧 datagrid control to represent some data. I want to show values from multiple columns in one cell. How to achieve that? Currently my datagrid is binded to List. List elements

I am using开发者_开发技巧 datagrid control to represent some data. I want to show values from multiple columns in one cell. How to achieve that? Currently my datagrid is binded to List. List elements implements INotifyPropertyChanged interface, and each property of individual objects represents column in datagrid.


you can project the list to a new list satisfying this constraint, or change the query that returns data,

var newList= list.Select(o=> new {newProp = o.prop1 + ' ' + o.prop2});
0

精彩评论

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