开发者

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 };
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜