I have a program in which I upload a DLL containing various types of objects. When uploaded, I create an instance of each type and save it into a Treeview (these objects may contain other objects inside). The purpose of the program is to edit these objects, so I have a propertyGrid which allows me to edit the selected object in the Treeview. This works perfectly fine for almost every object. I'm just having problems editing objects with properties whose types are List of xObjectType and this xObjectType has a yObjectType as property: For example, these classes are defined in the DLL, I have to edit FunctionCommand, however when I select the property Function in the propertyGrid a CollectionEditor pops up, this Collection Editor works fine when inner properties are of type int, string, byte[] etc. However I cannot edit properties which are more complex objects. In this case the RFunction property is disabled.
public partial class FunctionCommand
{
/// <summary> Number of functions sent as part of the command</summary>
public uint TotalNoOfFunctions { get; set; }
/// <summary> Message structure for the function definition. Cloud shall always set this.</summary>
public List<Function> Function { get; set; }
}
public partial class Function
{
public enum StoragePriorityENUM
{
LOW = 0,
HIGH = 1,
}
/// <summary> Function id to uniquely identify a function</summary>
public string FunctionId { get; set; }
/// <summary> Set this ONLY for R function</summary>
public RFunction RFunction { get; set; }
}
public partial class RFunction
{
/// <summary> Diagnostics data for R function</summary>
public DIAGData DiagData { get; set; }
/// <summary>shall start the diagnostic process with a delay(minutes)</summary>
public uint DelayTimeToStart { get; set; }
}
I can edit these type of objects correctly outside the CollectionEditor but not inside of it. Why does this specific property is not editable, How can I make to edit complex objects inside the CollectionEditor?
Aucun commentaire:
Enregistrer un commentaire