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. Visual Basic
  4. Clone (deep copy) datagrid

Clone (deep copy) datagrid

Scheduled Pinned Locked Moved Visual Basic
questionalgorithmstutorial
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.
  • M Offline
    M Offline
    mikone
    wrote on last edited by
    #1

    Hi guys, I just spent about 4 hours of searching for how to make a deep copy of a datagrid. I tried to serialize it, but its marked as being unserializable. I also read about manual cloning (like implementing the ICloneable interface) but didn't get the clue. So theres a third option I already read of: Creating a new class, which inherits the datagrid and provides a new method (named deepcopy() or whatever), whichs task ist to create a new instance of a datagrid and transfers all the properties/variables/objects of the sourcedatagrid and finally returns the new instance. since the datagrid isn't a small class, it would take a long time to write this method. since you could use this method for datagrids only, it would be very inefficient. So here's the question: Is there any possibility to write a clone-function which creates a deep copy and works for every kind of object? thanks in advance, mik :) *edit* i also read something about reflection but the english was too difficulty to read, so i didn't get the point :/ if that could be a solution i would be pleased about any links to a nice explanation :) -- modified at 6:08 Thursday 8th September, 2005

    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