I'm banging my head against the wall with this one, I really need help.
Here's my problem :
I have a class, which is defined as the following :
What I'd like to do is use the self reference functionnality of the RadGridView to display a hierarchical grid which would have in the first level, the _Menu attribute, and then, in the child grid, the content of _Sous_menu (which of course, can have a _Sous_menu as well)
So basically, can I create a self reference hierarchical grid from a self recursive datatype ?
4 Answers, 1 is accepted
The Self Referencing hierarchy works by matching properties on the date items that are used as ItemsSource. For instance, our Self Reference demo uses Employee data object that have the following properties:
In addition to that we create new TableDefinition that sets up the relationship:
With this definition we are instructing the grid to match the EmployeID property of every data item to the ReportTo properties of all data items. All matching rows are displayed in a child grid.
If your data items allows such matching there should be no problem to create a self referencing hierarchy.
How do you intend to match NomenclatureHierarchy (_Sous_menu) to NomenclatureHierarchy?
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items.
Then, I subscribed to the loading event to recreate in every child grid when they load the columns to display with the proper binding of the IList<donnees_grilleBO> for each of its element, and for each gridviewdatacontrol, I subscribed to the rowloaded event to test if there is still elements to display in hierarchy, otherwise, I just set the IsExpandable to false.
This way, I can get a n-deep hierarchical grid using a simple recursive class.
You wouldn't happen to have a sample project of this?
Here's the source code I've used for my scenario