.net - Editing Objects with PropertiesGrid (C#/WinForms) -


i have class called ansfile wrote want make editable propertiesgrid. class has properties including list of ansjoints, class wrote. ansjoints class has property of type anspoint, third class wrote.

i want able edit anspointof joint in ansfile's collection propertygrid. have form implemented:

enter image description here enter image description here

but anspoint property not editable. how can change anspoint class editable in grid?

ansdistance source

[typeconverter(typeof(expandableobjectconverter))] public class ansdistance {     public double length { get; set; } //value of distance being stored     public distancetype type { get; set; } //type of distance being stored      public ansdistance()     {         this.length = 0.0;         this.type = distancetype.inch;     }      public ansdistance(double passedlength, distancetype type = distancetype.inch)     {         this.length = passedlength;         this.type = type;     }      public ansdistance(distance passeddistance, distancetype type = distancetype.inch)     {         this.length = passeddistance.getvalue(type);         this.type = type;     }      public override string tostring() //returns value of distance rounded 2 decimal places     {         return math.round(this.length, 2).tostring();     } 

anspoint source

[typeconverter(typeof(expandableobjectconverter))] public class anspoint {     public ansdistance x;     public ansdistance y;      public anspoint(ansdistance passedx, ansdistance passedy)     {         this.x = passedx;         this.y = passedy;     }      public override string tostring()     {         return this.x.tostring() + ", " + this.y.tostring();     } } 

partial ansjoint

 public class ansjoint  {      public anspoint location { get; set; } //point made of values found under x , y coordinates columns  } 


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -