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. Example DataGridView like Outlook...

Example DataGridView like Outlook...

Scheduled Pinned Locked Moved C#
tutorialhelpquestion
4 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.
  • J Offline
    J Offline
    jsosa9
    wrote on last edited by
    #1

    Hi to all, I want to program a AGENDA like outlook for my appointments. I want to use drag & drop for modify appointments and make click over a cell and to create a new one. Can anybody help me or guide me? Thanks a lot.

    _______ NaOH

    V 1 Reply Last reply
    0
    • J jsosa9

      Hi to all, I want to program a AGENDA like outlook for my appointments. I want to use drag & drop for modify appointments and make click over a cell and to create a new one. Can anybody help me or guide me? Thanks a lot.

      _______ NaOH

      V Offline
      V Offline
      velkropie
      wrote on last edited by
      #2

      how about you start programming it and we can guide you from there?

      The Devil Lives in all of us, It's up to you to let HIM/HER out!!!!!

      J 1 Reply Last reply
      0
      • V velkropie

        how about you start programming it and we can guide you from there?

        The Devil Lives in all of us, It's up to you to let HIM/HER out!!!!!

        J Offline
        J Offline
        jsosa9
        wrote on last edited by
        #3

        Hi velkropie, i want to use de datagridview control to make a personal agenda. It is like Outlook format. To create appointments, drag and drop across the cells, and this new controls (appointments, 'citas' in spanish) can be stored in a database. I begin with Visual Studio 2005 and the datagridview control. I need code examples to built this grid, format it and to insert new controls (labels for example) in the grid and a database. Thanks a lottt.

        _______ NaOH

        V 1 Reply Last reply
        0
        • J jsosa9

          Hi velkropie, i want to use de datagridview control to make a personal agenda. It is like Outlook format. To create appointments, drag and drop across the cells, and this new controls (appointments, 'citas' in spanish) can be stored in a database. I begin with Visual Studio 2005 and the datagridview control. I need code examples to built this grid, format it and to insert new controls (labels for example) in the grid and a database. Thanks a lottt.

          _______ NaOH

          V Offline
          V Offline
          velkropie
          wrote on last edited by
          #4

          here is you drag and drop to get you started void grdCampaigns_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { DataGridView.HitTestInfo info = grdCampaigns.HitTest(e.X, e.Y); if (info.RowIndex >= 0) { DataRowView view = (DataRowView) grdCampaigns.Rows[info.RowIndex].DataBoundItem; if (view != null) grdCampaigns.DoDragDrop(view, DragDropEffects.Copy); } } } void lstCategories_DragEnter(object sender, DragEventArgs e) { e.Effect = DragDropEffects.Copy; } Collapse void lstCategories_DragDrop(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(typeof(DataRowView))) { // Determine which category the item was draged to Point p = lstCategories.PointToClient(new Point(e.X,e.Y)); int index = lstCategories.IndexFromPoint(p); if (index >= 0) { // Get references to the category and campaign DataRowView category = (DataRowView)lstCategories.Items[index]; DataRowView campaign = (DataRowView) e.Data.GetData(typeof(DataRowView)); // Get the old and new category ids int newID = (int)category[0]; int oldID = (int)campaign[1]; // Make sure the two do not match if (oldID != newID) { campaign.BeginEdit(); campaign[1] = newID; campaign.EndEdit(); } } } }

          The Devil Lives in all of us, It's up to you to let HIM/HER out!!!!!

          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