WPF datagrid multiple row selection
I have a customcontrol similar to wpf datagrid. I need to select the multiple rows and开发者_高级运维 get the column values of all the selected rows. Could anyone help to solve this.
We need a bit more information for the question, but you could look at LINQ? Maybe you can work with this:
List<int> rows = new List<int>{1,2,3};
var values = from row in datagrid
where rows.Contains(row.Select(e => e.rowindex))
select new { Value = row.value };
精彩评论