Add Item to list view [modified]
-
This c# coding is to do drag and drop and reorder in list view. In this coding it can only add string to it. How i am going to add item besides string so that i can do drag and drop to that item. using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; namespace TestDrag { /// /// Summary description for Form2. /// public class Form2 : System.Windows.Forms.Form { private DragNDrop.DragAndDropListView listView1; private DragNDrop.DragAndDropListView listView2; private System.Windows.Forms.ImageList imageList1; private System.ComponentModel.IContainer components; public Form2() { // // Required for Windows Form Designer support // InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // LoadInfo(); } /// /// Clean up any resources being used. /// protected override void Dispose( bool disposing ) { if( disposing ) { if(components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form2)); this.listView1 = new DragNDrop.DragAndDropListView(); this.imageList1 = new System.Windows.Forms.ImageList(this.components); this.bar = new System.Windows.Forms.ImageList(this.components); this.listView2 = new DragNDrop.DragAndDropListView(); this.listView2.SuspendLayout(); this.SuspendLayout(); // // listView1 // this.listView1.AllowDrop = true; this.listView1.AllowReorder = true; this.listView1.LargeImageList = this.imageList1; this.listView1.LineColor = System.Drawing.Color.Red; this.listView1.Location = new System.Drawing.Point(8, 8); this.listView1.Name = "listView1"; this.listView1.Size = new System.Drawing.Size(272, 96); this.listView1.TabIndex = 0; // // imageList1 // this.imageList1.ImageSize = new System.Drawing.Size(24, 24); this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList