This is a migrated thread and some comments may be shown as answers.

ParentId replaces the real Model property for parent id

1 Answer 76 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 09 Aug 2015, 11:43 AM

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.

 

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Nikolay Rusev
Telerik team
answered on 11 Aug 2015, 11:54 AM

Hello Paul,

 

This behavior should be changed with the recent release. Can you please upgrade to 2015.2 805 and give it a try.

 

Regards,
Nikolay Rusev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
TreeList
Asked by
Paul
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or