Hi
I've tried implementing the solution provided there, but I'm unable to get it working. Is there a different way of implementing XML export for EJ 1?
The implementation breaks class: "XmlImportingHelper.Gantt", method: "ConvertGanttObject" line 102:
Error message: System.FormatException: 'stringedit is not a valid value for TreeGridEditingType.'
private GanttProperties ConvertGanttObject(string ganttModel)
{
JavaScriptSerializer serializer = new JavaScriptSerializer();
serializer.MaxJsonLength = Int32.MaxValue;
IEnumerable div = (IEnumerable)serializer.Deserialize(ganttModel, typeof(IEnumerable));
GanttProperties ganttProp = new GanttProperties();
foreach (KeyValuePair<string, object> ds in div)
{
var property = ganttProp.GetType().GetProperty(ds.Key, BindingFlags.Instance | BindingFlags.Public | BindingFlags.IgnoreCase);
if (property != null)
{
Type type = property.PropertyType;
string serialize = serializer.Serialize(ds.Value);
object value ;
if (ds.Key == "dataSource")
{
value = serializer.Deserialize<List<BusinessObject>>(serialize);
}
else if (ds.Key == "resources")
{
value = serializer.Deserialize<List<GanttResources>>(serialize);
}
else
{
value = serializer.Deserialize(serialize, type); // Breaks here
}
property.SetValue(ganttProp, value, null);
}
}
return ganttProp;
}