listvie一点,翻翻属性就知道是哪个了(英语0级以上)

解决方案 »

  1.   

      private void button1_Click(object sender, EventArgs e)
            {
                //第一项第一单元格值
                MessageBox.Show(LVData.Items[0].SubItems[0].Text);
            }        private void Form1_Load(object sender, EventArgs e)
            {
                this.LVData.Columns.Add("A", 70, HorizontalAlignment.Left);
                this.LVData.Columns.Add("B", 70, HorizontalAlignment.Left);
                this.LVData.Columns.Add("C", 70, HorizontalAlignment.Left);
                LVData.View = View.Details;
                string[] str = new string[3];
                string[] str2 = new string[3];            str[0] = "1";
                str[1] = "11";
                str[2] = "111";
                ListViewItem item = new ListViewItem(str, 0);
                LVData.Items.Add(item);            str2[0] = "2";
                str2[1] = "22";
                str2[2] = "222";
                ListViewItem item2 = new ListViewItem(str2, 0);
                LVData.Items.Add(item2);
                
            }