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. Inherit Tree View property problem!

Inherit Tree View property problem!

Scheduled Pinned Locked Moved C#
questiondata-structureshelp
3 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.
  • D Offline
    D Offline
    drey1
    wrote on last edited by
    #1

    i am creating a databound treeview but i am having trouble with my properties. I created a collection to hold the labels. and i added to the designer. I can create the labes, however, i do not know how can i save it; public class MyTreeColumns // this is my class containing the string label public class MyTreeColumnsCollection:CollectionBase // this is my collection of labels with methods for indexing, Add, Indexof, insert, remove, and contains. in the dataTreeView class I added: MyTreeColumnsCollection _objects = new MyTreeColumnsCollection(); [Browsable(true)] public MyTreeColumnsCollection TreeColumns { get { return _objects; } set { _objects = value; } } what i am missing? thank you drey:confused:

    C 1 Reply Last reply
    0
    • D drey1

      i am creating a databound treeview but i am having trouble with my properties. I created a collection to hold the labels. and i added to the designer. I can create the labes, however, i do not know how can i save it; public class MyTreeColumns // this is my class containing the string label public class MyTreeColumnsCollection:CollectionBase // this is my collection of labels with methods for indexing, Add, Indexof, insert, remove, and contains. in the dataTreeView class I added: MyTreeColumnsCollection _objects = new MyTreeColumnsCollection(); [Browsable(true)] public MyTreeColumnsCollection TreeColumns { get { return _objects; } set { _objects = value; } } what i am missing? thank you drey:confused:

      C Offline
      C Offline
      Carsten Zeumer
      wrote on last edited by
      #2

      I think you have to mark your classes as [Serializable]. Depending on your object structure you might have to implement the ISerializable and IDeserializationCallback interfaces. (Like Hashtable does) /cadi 24 hours is not enough

      D 1 Reply Last reply
      0
      • C Carsten Zeumer

        I think you have to mark your classes as [Serializable]. Depending on your object structure you might have to implement the ISerializable and IDeserializationCallback interfaces. (Like Hashtable does) /cadi 24 hours is not enough

        D Offline
        D Offline
        drey1
        wrote on last edited by
        #3

        that's what i was missing! and the : [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] thank you drey

        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