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

[Solved] Self referring hierarchical data binding

2 Answers 113 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Arash
Top achievements
Rank 1
Arash asked on 07 Feb 2012, 02:58 PM
Hi,

I'm using Extensions for ASP.NET MVC Q3 2011(open source version) with Razor engine and Asp.net MVC3 architecture.
I want to bind a grid to a entity in my database which has self referring structure (like a tree). Therefore, I can not define it like examples with fixed levels, because I do not know how many levels this grid has. So, I want to bind my grid dynamically to a model.

public class Category : Entity
    
        public virtual int Id {private set; get; }
        public virtual string Title { set; get; }
        public virtual string Description { set; get; }
        public virtual string ParentsPath { set; get; }
        public virtual IList<Category> Children { get; private set; }
        public virtual Category Parent { get; set; }
}
I'm also using Fluent NHibernate and because of that I store children and parent in my entity.

Is there a way to do this? I couldn't find anything in documentations.
Am I missing something? because in Ajax and Winform components, it has been implemented.

I understood that it is better to use tree component for this purpose, but, Is it possible to edit nodes in Telerik tree?Is editable tree supported by Telerik?I could not find it in documentations.

I want also apply a custom localization to my grid. I want to change it's properties to my custom provider (I've done it in Winforms components). Is MVC grid also support this?


Thanks.

2 Answers, 1 is accepted

Sort by
0
Jhelumi
Top achievements
Rank 1
answered on 24 Feb 2012, 11:24 AM
Did U find any solution to this as I'm facing the same problem?
0
Arash
Top achievements
Rank 1
answered on 25 Feb 2012, 07:18 AM
No, I didn't find any suitable answers. I used tree for my purpose but, I can not use any more columns except nodes title in tree. So, if you want to show only one column in your view, tree will do it for you. You can find exact solution in tree examples.
Tags
Grid
Asked by
Arash
Top achievements
Rank 1
Answers by
Jhelumi
Top achievements
Rank 1
Arash
Top achievements
Rank 1
Share this question
or