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

TreeView drawning from DataBase

1 Answer 56 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Fier
Top achievements
Rank 1
Fier asked on 02 Nov 2012, 07:13 AM
HI.
I need help plz.

Create a table with following fields:
ID | CODE | NAME
Where
ID - id, CODE - item number, NAME - the name of range.

CODE should have the followinf format:
xx.yy.zz
where, xx - activites, yy - contract, yy - task.

In the DB will be store as follows:
1 | 01           | Basic activites
2 | 01.01      | Contract about 1
3 | 01.02      | Contract about Bank
4 | 02           | Hoz activites
5 | 02.02      | Contract el
6 | 02.02.01 | Electric
7 | 02.02.02 | Hot

Just have to take into account the fact that the levels of the hierarchy can be expended. So they con not 3. Be even so xx.yy.zz.hh.ee

I add data the the database (yet without additions of new ones). How to create a universal algorithm to treeView filled exactly hierarchy?

The result  of which must  be obtained:

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 06 Nov 2012, 04:20 PM
Hello Fier,

The question that you are asking is not directly related to RadControls for WinForms functionality. Instead, it is a general development question and it is up to you how you will proceed with parsing the data using the data format that you plan to have. We can only assist you with code snippets regarding the process of adding nodes to RadTreeView and subnodes to the parent nodes (you can see more information about this here), but before that you need to decide how the data from your data source will be parsed to objects in the appropriate hierarchical order.

Regards,
Nikolay
the Telerik team
Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
Tags
Treeview
Asked by
Fier
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or