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. How to drag and drop a file into DataGridView? [modified]

How to drag and drop a file into DataGridView? [modified]

Scheduled Pinned Locked Moved C#
csharpdotnettutorialquestion
2 Posts 2 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.
  • M Offline
    M Offline
    mimimimilaw
    wrote on last edited by
    #1

    I would like to drag and drop a row in DataGridView on .net framework 2.0 the row is a file detail from window explorer. private void dGV_fileUpload_DragDrop(object sender, DragEventArgs e) { Object fileName = (Object)e.Data.GetData(typeof(????)); FileInfo file = new FileInfo(fileName); DataGridViewRow row = new DataGridViewRow(); row.CreateCells(dGV_fileUpload); row.Cells[0].Value = file.Name; row.Cells[1].Value = GetFileSize(file.Length); row.Cells[2].Value = file.LastAccessTime.ToString(); this.dGV_fileUpload.Rows.Add(row); }

    modified on Wednesday, September 24, 2008 5:44 AM

    G 1 Reply Last reply
    0
    • M mimimimilaw

      I would like to drag and drop a row in DataGridView on .net framework 2.0 the row is a file detail from window explorer. private void dGV_fileUpload_DragDrop(object sender, DragEventArgs e) { Object fileName = (Object)e.Data.GetData(typeof(????)); FileInfo file = new FileInfo(fileName); DataGridViewRow row = new DataGridViewRow(); row.CreateCells(dGV_fileUpload); row.Cells[0].Value = file.Name; row.Cells[1].Value = GetFileSize(file.Length); row.Cells[2].Value = file.LastAccessTime.ToString(); this.dGV_fileUpload.Rows.Add(row); }

      modified on Wednesday, September 24, 2008 5:44 AM

      G Offline
      G Offline
      Giorgi Dalakishvili
      wrote on last edited by
      #2

      This might help: Drag and Drop[^]

      Giorgi Dalakishvili #region signature my articles My blog[^] #endregion

      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