TreeView drawning from DataBase

2 posts, 0 answers
  1. Fier
    Fier avatar
    3 posts
    Member since:
    Nov 2012

    Posted 02 Nov 2012 Link to this post

    I need help plz.

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

    CODE should have the followinf format:
    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

    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:

  2. Nikolay
    Nikolay avatar
    1802 posts

    Posted 06 Nov 2012 Link to this post

    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.

    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
  3. DevCraft R3 2016 release webinar banner
Back to Top