Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Add Item to list view [modified]

Add Item to list view [modified]

Scheduled Pinned Locked Moved C#
csharpgraphicsdocker
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shamsteady
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups