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. Using PropertyGrid and Collection Editor

Using PropertyGrid and Collection Editor

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

    Hello, I have 3 classes for example : public MainClass { private int maximum = 100; private int minimum = 0; private int valueC = 50; [Browsable(true)] public int Maximum { get {return maximum ;} set {maximum =value;} } [Browsable(true)] public int Minimum { get {return minimum ;} set {minimum =value;} } [Browsable(true)] public int ValueC { get {return valueC ;} set {valueC=value;} } public MainClass() { } } public ElementsClass { private PropertiesClass elementsProperties; [Browsable(true)] public PropertiesClass ElementsProperties { get {return elementsProperties;} set {elementsProperties =value;} } public ElementClass() { } } public PropertiesClass { private bool visible = true; private Color colorC = Color.Black; private bool blink = true; [Browsable(true)] public bool Visible { get {return visible;} set {visible =value;} } [Browsable(true)] public Color ColorC { get {return colorC;} set {colorC=value;} } [Browsable(true)] public bool Blink { get {return blink;} set {blink=value;} } public PropertiesClass() { } } In the MainClass i want to include a ElementClass property but i must be able to have an ElementClass array or collection and each ElementClass has the 3 PropertiesClass properties. What i don't know how to do :confused: is the next: I want to show the MainClass properties in a PropertyGrid, the ElementsClass data must open a new window like a collection editor showing a list of all the ElementsClass objects that i have created. Finally when i select some element in the list, the propertyGrid must show the PropertiesClass properties (visible, colorC, blink). Can somebody help me with this? Regards, Alberto Martinez

    R 1 Reply Last reply
    0
    • J JuanAlbertoMD

      Hello, I have 3 classes for example : public MainClass { private int maximum = 100; private int minimum = 0; private int valueC = 50; [Browsable(true)] public int Maximum { get {return maximum ;} set {maximum =value;} } [Browsable(true)] public int Minimum { get {return minimum ;} set {minimum =value;} } [Browsable(true)] public int ValueC { get {return valueC ;} set {valueC=value;} } public MainClass() { } } public ElementsClass { private PropertiesClass elementsProperties; [Browsable(true)] public PropertiesClass ElementsProperties { get {return elementsProperties;} set {elementsProperties =value;} } public ElementClass() { } } public PropertiesClass { private bool visible = true; private Color colorC = Color.Black; private bool blink = true; [Browsable(true)] public bool Visible { get {return visible;} set {visible =value;} } [Browsable(true)] public Color ColorC { get {return colorC;} set {colorC=value;} } [Browsable(true)] public bool Blink { get {return blink;} set {blink=value;} } public PropertiesClass() { } } In the MainClass i want to include a ElementClass property but i must be able to have an ElementClass array or collection and each ElementClass has the 3 PropertiesClass properties. What i don't know how to do :confused: is the next: I want to show the MainClass properties in a PropertyGrid, the ElementsClass data must open a new window like a collection editor showing a list of all the ElementsClass objects that i have created. Finally when i select some element in the list, the propertyGrid must show the PropertiesClass properties (visible, colorC, blink). Can somebody help me with this? Regards, Alberto Martinez

      R Offline
      R Offline
      Robert Rohde
      wrote on last edited by
      #2

      First you could have searched for collection editor[^] here on CodeProject. That gives you several links. Here[^] and here[^] are two good articles which deal especially with this topic.

      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