How to create treetable for master child entities

I need some help in creating a tree table for master and child table.my project contains two tables Student and classname. stid is primary key in student table and the same stid act as foreign key in classname table.

any suggestion.

Hi,

TreeTable needs an entity that has a reference to itself (hierarchyProperty attribute). So you have to create a non-persistent entity, e.g. TreeItem and map your Student/Classname entities to it. Create a collection container and loader for TreeItem, generate load delegate and do loading of persistent entities and mapping to TreeItem.

Alternatively, you can map your entities to a KeyValueEntity list and use keyValueCollection container. It will save your from defining the TreeItem class.

thanks