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. Problem with PropertyGrid

Problem with PropertyGrid

Scheduled Pinned Locked Moved C#
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.
  • S Offline
    S Offline
    sandeepkavade
    wrote on last edited by
    #1

    Hi, I am basically a VC++ developer but now working on C#. I am having a assembly in that i have added a UserControl and on that UserControl I am having a tree-view control and Property Grid control. As and when user selects the different nodes I am populating the corresponding properties in that grid. For the normal properties its working perfectly. But when I have to choose the property from the drop-down list. Its creating the problem. Whenever I click on the drop-down arrow nothing happens. So I created a test application. Took a windows form application added property grid, added a class deriving it from StringConverter. Everything works fine in test application. But I don't know why its failing in my production code. I debugged both codes. In test application whenever I click on the drop-down arrow call is coming inside GetStandardValues function. But this is not happening in my main code, its not hitting the break-point at all. Can anybody tell me why this is happening, Where I am going wrong? the test application code is below. The exact code is present in my main code namespace PropertyPage { class MyProperties:StringConverter { private double str1; private string str2; private string str3; public override bool GetStandardValuesSupported(ITypeDescriptorContext context) { //return base.GetStandardValuesSupported(context); return true; } public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) { //return base.GetStandardValuesExclusive(context); return true; } public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { return new StandardValuesCollection(new string[] { "Entry1", "Entry2", "Entry3" }); } [CategoryAttribute("Task "), DescriptionAttribute("test"), TypeConverter(typeof(MyProperties))] public string Str3 { get { return str3; } set { str3 = value; } } [CategoryAttribute("Task "), DescriptionAttribute("test"), ReadOnly(true)] public double Str1 { get { return str1; } set { str1 = value; } } [Editor(typeof(System.Windows.Forms.Design.FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))] public string Str2 { get { return str2; } set { str2 = value;

    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