C# Datagrid multiple columns to one column
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});
精彩评论