Advice on choosing the right component

1 Answer 73 Views
Grid TreeList
Per Rye
Top achievements
Rank 1
Per Rye asked on 09 Sep 2024, 11:16 AM

I am a newbee in Kendo Components and need advice on selecting the right component.

I want a grid or tree representation of something like a book with the following structur.

- Book 1

-- Chapter 1

--- Subchapter 1

---- Line 1

---- Line 2

--- Subchapter 2

---- Line 1

---- Line 2

- Book 2

-------

-------

There are about 18 books. Some books divide lines in both chapters and subchapters. Other books only divide by chapters. So using a Grid can be a problem since setting groups = 'book, chapter, subchapter' would mean that books that dont use subchapters will be presented with an empty group for subchapter

I have tried using Master-Detail grid with 4 levels af grid (see the picture). This actually seem to work but will require a lot of styling to get rid of unwanted space. And there is the issue of a bit difficult navigation betwwen the levels.

Would it be better to use a treelist or treeview.

1 Answer, 1 is accepted

Sort by
0
Zornitsa
Telerik team
answered on 12 Sep 2024, 08:48 AM

Hi Per Rye,

Thank you very much for the provided details and screenshot.

Given the explained use-case scenario, since hierarchical data needs to be displayed, the TreeList and the TreeView are indeed suitable components in this case as they support such type of layout by default.

Regarding which of the two components to choose, it really depends on what structure and appearance are more preferred and suitable for your paricular scenario.

The TreeList component's look and feel are more similar to the Grid but with a built-in hierarchical data binding. It supports a tree-like structure with multiple columns that can show each property of the data items. The TreeList also provides functionalities that are typical for the Grid, such as sorting, paging, editing, and so on.

On the other hand, the TreeView has a more simple layout that does not provide multiple columns and is suitable for not sophisticated use cases where the data can be displayed only on one column. 

Feel free to check out the documentation articles regarding all functionalities for each of the components to decide which is the most appropriate component for your scenario:

I hope the provided information is helpful. Let me know if further assistance on this matter is needed.

Regards,
Zornitsa
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Grid TreeList
Asked by
Per Rye
Top achievements
Rank 1
Answers by
Zornitsa
Telerik team
Share this question
or