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
K

kashme

@kashme
About
Posts
3
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • PropertyDescriptor.GetValue and PropertyInfo.GetValue
    K kashme

    PropertyDescriptor.GetValue(object component); what is this component. I do not get. Can someone please get an example. Also why PropertyInfo.GetValue(object, objects[]) needs to have parameters. Why we cannot have values through reflection directly. Can someone give me example of propertydescriptor.GetValue(object component), how to use it. I do not find much on msdn.

    C# tutorial question

  • "Find" name or value of property in Property Grid (property grid is tree structure)
    K kashme

    Maybe I did not explained the question properly. I am not a beginner n C# :^) i am not looking for answer a.B.C.x etc to access the value. I want the answer in tree and propertygrid perspective. I have a form with tree structure on left side and property grid on right side. When I load the form by adding object A to tree structure I can see the properties in propertygrid on right hand side, that is fine. I can see B,C and x,y,z and I can modify it. That is fine too. Now I want to add a menu option like visual studio "Find" to find the name or value based on the search condition. So in my example I want to search name "x" in the tree. The output should highlight x and show its value in the property grid. I tried to use propertydescriptor to get properties of A, so it gives me I have property B but how can I access class C and its property dynamically. Let me know if my problem is not clear.

    C# help css data-structures

  • "Find" name or value of property in Property Grid (property grid is tree structure)
    K kashme

    Consider a larger picture. Suppose I have class A,B,C. Class A contains property B and class B contains property C and class C have some properties. How will I access properties of C. I need to know a generic solution. Now suppose I start from A as rootNode in tree structure and propertyGrid.SelectedObject = A, how will I access properties of class C. In real world context suppose I need to find "x" using property grid and tree structure. The output should highlight x and its value in propertygrid. sample code:: Class A { B b { get; set;} } Class B { C c { get; set;} } Class C { int x { get; set;} float y { get; set;} string z { get; set;} } int main() { A a = new A(); propertyGrid.SelectedObject = a; } How will I access x,y,z name and value using propertygrid. I am stuck here, please help.

    C# help css data-structures
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups