ParentId replaces the real Model property for parent id

2 posts, 1 answers
  1. Paul
    Paul avatar
    113 posts
    Member since:
    May 2009

    Posted 09 Aug 2015 Link to this post

        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);

    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.







  2. Answer
    Nikolay Rusev
    Nikolay Rusev avatar
    2287 posts

    Posted 11 Aug 2015 Link to this post

    Hello Paul,


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


    Nikolay Rusev
    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
Back to Top