Hierarchical Data Grid View Example

Hierarchical Data Grid View Example Average ratng: 5,0/5 6759 votes

Hi guys, I’m trying to use the new hierarchical rows of DGV, which I have been anticipating for long! In my case, I have a list of “therapies” assigned to a patient. Each therapy has a type and a therapist. From time to time, a certain therapist changes and a new therapy of the same type is created with the new therapist. I want to show only one therapy of each type (the latest one with the current therapist) as my parent row and when expanding show the previous therapies of the same type (with the previous therapists).

Dd sahyadri online. I have a couple of questions: • First of all, what’s the idea? Am I doing the right thing?

Grid

Show multiple parent-child relationships in an expandable, hierarchical data grid that stands as the backbone of your data-centric JavaScript-based client applications.

Are the child rows supposed to be of the same object (my case) or are they of a different object like, e.g., parent rows being order headers and each of them when expanded showing the order details (items)? • I’m using them assuming that the first is true. Right hemisphere deep exploration cad edition v6.5.0 x64.

How am I supposed to populate my grid? I tried loading all the rows (parent and children) first and then in the BindingComplete event loop over rows, find the parent ones and for each parent find the corresponding children and set their.Parent property accordingly.

Is this the way to go? I am having errors of the type “parent row cannot follow child row” or something like this. • When a row becomes parent, an “expand” icon shows up in the first column with the value of this column shifted to the right. However, the values of this first column for the children rows do not show any more. Is this intented and I should add a “dummy” first column to accommodate the “expand” icon? A usage example would be great! Thanks a lot for this addition!

Hi Luca, Ok, I have to admit I hadn’t thought about deeper hierarchy levels. I only considered one “expand” button on the top parent row header and no more on its child rows. I suppose what I really have in mind is more a master (parent) – detail (children) situation and not a real multi-level hierarchy. That’s why I tend to believe that the “row control” will be the best in my case. I will have to play with the sorting as you describe it. For the moment, I have just disabled column header sorting altogether to avoid the problem! Hi Alex, Putting the open/close button in the row header is possible (it’s like that for the first level in the PropertyGrid control), but it cannot show the hierarchy, all the open/close buttons would be at the same level.

It could be an optional property. I haven’t seen tree grids doing that. See Sencha for example: You’ll also notice that when you see samples from DevEx, Telerik, Sencha, etc they never mix parent and non parent rows.

The tree rows as implements in Wisej are quite flexible, but if you mix parent and non parents that’s what’s displayed. Hierarchical row sorting is done by following the hierarchy. Wisej first create a tree in memory, then sorts it according to the path to the node, then flattens the list and updates the grid. I wasn’t able to break it with the latest build. Putting an expandable panel under a row can also be a new enhancement.

The main problem to adding that to our grid is the virtual scrolling mixed with variable height rows based on rows and not pixels – so a large panel would scroll as one unit. We don’t a solution to this yet since the rows can all be of a different height and with the virtual scrolling we need to be able to jump to a specific row according to the scrollbar position. Still working on this Last, but not least 🙂 the DGV in Wisej is extremely integrated with the server at all levels, i.e. Data binding, editing, controls in cells, editing controls, events of all sorts, columns event, scrolling. This makes it a lot more complicated to add super slick client-side features since they’d have to fit into the data and server model.