使用多列到列表视图 [英] Using multiple columns to a list view

查看:96
本文介绍了使用多列到列表视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们,谁知道如何将文本添加到多列列表中?如何在列表视图中向不同列添加文本?您真正需要的不是对这个相对简单的问题的解释-如果您花些力气,您将很容易找到代码示例.它将对您有更大的帮助.

您的问题非常不同:您应该学习如何提出问题并知道您在问什么.为什么?

这就是为什么. 列表视图"可能表示:


  1. System.Windows.Forms.ListView;
    请参见 http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.aspx [ http://msdn.microsoft.com/zh-我们/library/system.web.ui.webcontrols.listview.aspx [ http://msdn.microsoft.com/en-us/library/system.windows.controls.listview.aspx [
    —SA


    以下是在C#中添加多个列的示例.
    http://www.java2s.com/Code/CSharp/GUI-Windows-Form/ListViewExample.htm [ ^ ]

    除非您需要在不同的视图模式之间切换,否则使用Grid几乎总是更容易.

    最好的问候
    Espen Harlinn


    Hie guys does anyone know hw to add text to multi-column list how do you add text to different columns in the list view please do help me

    解决方案

    What you really need is not the explanation of this relatively simple problem — you will easily find the code sample if you take a bit of labor; it will be even more helpful for you.

    You problem is very different: you should learn how to ask questions and know what are you asking about. Why?

    Here is why. "List view" might mean:


    1. System.Windows.Forms.ListView;
      see http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.aspx[^];
    2. System.Web.UI.WebControls.ListView;
      see http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.listview.aspx[^];
    3. System.Windows.Controls.ListView;
      see http://msdn.microsoft.com/en-us/library/system.windows.controls.listview.aspx[^].



    There could be something else: third-party controls, for example.

    Surprise? Think about such things before asking; and do your research by yourself. Only ask a question when you know what are you asking about and have a real problem.

    No, don''t use "Improve question" just yet. Read what you need to know, Google is you have some doubt, try to write you code and ask a question only when you are really stuck and can clearly formulate your problem.

    —SA


    Here is an example that adds multiple columns in C#
    http://www.java2s.com/Code/CSharp/GUI-Windows-Form/ListViewExample.htm[^]

    Unless you need to switch between different view modes, it''s nearly always easier to use a Grid.

    Best regards
    Espen Harlinn


    这篇关于使用多列到列表视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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