Hi,
If you have a model say
public class Category {
public int Category_Id {get;set;}
public string Category_Name {get;set;}
public int? Parent_Category_Id {get;set;}
}
and you set the Model in the datasource of the treelist to
.Model(m =>
{
m.Id(f => f.Category_id);
m.ParentId(f => f.Parent_Category_Id);
m.Expanded(true);
})
Then the Parent_Category_Id is replaced with ParentId so when you view the datasource data items the property Parent_Category_Id is no longer there on any items. This causes problems when trying to update,edit etc as the real Parent_Category_id is never passed but instead a ParentId is.
Surely m.ParentId(f => f.Parent_Category_Id); should be just mapping this property and not replacing it.