zoukankan      html  css  js  c++  java
  • 大数据ListView

    因项目需求,要实现个类似股票的键盘精灵采用LISTVIEW显示,采用LIST<T>查找方式和虚表的操作方式

     private List<ptobj> ptlist=null;

     ptlist = null;

    //查找的关键
                ptlist = KeyPtsMap.getAllPts().FindAll(delegate(ptobj ptkey) { return ptkey.py.IndexOf(key) == 0; });

                //  listView1.Items.Clear();
                int iPtlistCount = ptlist.Count;
                m_hListViewItems = new List<ListViewItem>();

                for (int i = 0; i < iPtlistCount; i++)
                {

                    ListViewItem Item = new ListViewItem(new string[] { ptlist[i].chartname.ToString() + "-" + ptlist[i].py.ToUpper() });
                    // Item.Tag = ptlist[i].py.ToUpper()+"-"+ptlist[i].chartname.ToString()+"-"+ptlist[i].ptsn.ToString();
                    m_hListViewItems.Add(Item);
                }

    //虚表的操作方式
                listView1.RetrieveVirtualItem += new RetrieveVirtualItemEventHandler(listView_RetrieveVirtualItem);

                listView1.VirtualListSize = iPtlistCount;
                listView1.VirtualMode = true;

                this.listView1.Refresh();

                this.listView1.Focus();

  • 相关阅读:
    get和post区别
    cookie和session的区别
    节流和防抖
    eval()
    三次握手和四次挥手
    HTTP状态码
    AMD规范与CMD规范的区别?
    深拷贝和浅拷贝
    逆人性的人类出现,正常合理竞争该何去何从
    TestNG并发执行测试总结
  • 原文地址:https://www.cnblogs.com/sail/p/2063117.html
Copyright © 2011-2022 走看看