C#将listView列复制到另一个listView列 [英] C# Copy listView Columns to Another listView Column

查看:82
本文介绍了C#将listView列复制到另一个listView列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

美好的一天!!



首先,我想在这个论坛上感谢有机会就C#寻求帮助#

我有一个问题,我希望有人可以清楚我想要的是什么



我现在也想学习C#语言。



情况就是这样



我有3个listview即listView1,listView2,listView3



我在listView1和listView2上有动态数据



listView1有3个ColumnHeader,



listView2有2个ColumnHeader



而listView3有5个ColumnHeader



现在,我想要第一个,第二个listview1的第三个ColumnHeader

将被复制到listView3的第一个,第二个和第三个ColumnHeader



以及listView2的第一个和第二个ColumnHeader

将被复制到listView3的第四个和第五个ColumnHeader



是不是可能???

有人可以帮我这个吗?

i确实有这个代码将数据从listView1复制到listView3但它没有帮助我需要的东西,它只是将listView1复制到listView3。





Good Day!!

First Of All I would like to thanks in this forum for the opportunity to ask for help regarding C#
I have a problem, i hope someone can clear my mind what i wanted

and also im trying to learn C# language now.

the situation is like this

I have 3 listview namely listView1, listView2, listView3

I have dynamic data on listView1 and listView2

listView1 has 3 ColumnHeader,

listView2 has 2 ColumnHeader

while listView3 has 5 ColumnHeader

now, i want that the first, second and third ColumnHeader of listview1
will be copied to the first , second and third ColumnHeader of listView3

and the first and second ColumnHeader of listView2
will be copied to the fourth and fifth ColumnHeader of listView3

is it possible???
can someone help me this??
i do have this code to copy data from listView1 to listView3 but it doesn't help what i needed, it just copied the listView1 to listView3.


listView3.Items.AddRange((from ListViewItem item in listView1.Items
                               select (ListViewItem)item.Clone()
                                ).ToArray());







有人可以告诉我如何得到我需要的东西....

谢谢




Can someone enlighten me how to derive on what i needed....
thanks

推荐答案

这篇关于C#将listView列复制到另一个listView列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆