self-referencing RadTreeView with OpenAccessDataSource

Thread is closed for posting
6 posts, 0 answers
  1. Dmitry
    Dmitry avatar
    4 posts
    Member since:
    Nov 2008

    Posted 23 Nov 2008 Link to this post

    Hello,

    I’veexperienced a trouble with the cooperation of the OpenAccessDataSource and theRadTreeView. I tried to do self-referencing hierarchical data binding. When I was usingSqlDataSource it worked fine.  But afterI had switched to OpenAccessDataSource it showed me a list instead of ahierarchy view.  DataFieldId andDataFieldParentId fields in the RadTreeView configuration were correct for theboth cases. How can I get this working?

  2. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 24 Nov 2008 Link to this post

    Hello Dmitry,

    Can you send me your example project?

    Best wishes,
    Jan Blessenohl
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. OC
    OC avatar
    2 posts
    Member since:
    Nov 2004

    Posted 30 Mar 2009 Link to this post

    Having same problem... Can't se any logical reason for this not to work...

    <

     

    telerik:RadTreeView ID="RadTreeView1" Runat="server" DataFieldID="ID" DataFieldParentID="ParentID"

     

     

    DataSourceID="OpenAccessDataSource1" DataTextField="InterntNavn" MaxDataBindDepth="9"

     

     

    Skin="Vista" DataValueField="ID">

     

     

    <DataBindings>

     

     

    <telerik:RadTreeNodeBinding TextField="InterntNavn" Depth="9" ValueField="ID"

     

     

    ToolTipField="ParentID" />

     

     

    </DataBindings>

     

    </

     

    telerik:RadTreeView>

     

    <

     

    telerik:OpenAccessDataSource ID="OpenAccessDataSource1" runat="server"

     

     

    ObjectContextProvider="DataLag.ObjectScopeProvider1, DataLag"

     

     

    TypeName="DataLag.Kategori" Where="" EnableDelete="False"

     

     

    EnableInsert="False" EnableUpdate="False" ContextTypeName="" OrderBy="Sortering">

     

    </

     

    telerik:OpenAccessDataSource>

    OC

     

  4. Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 30 Mar 2009 Link to this post

    Hi Mutantmannen,

    Have you checked our KB article covering this scenario. I think it should be helpful for you to manage with your task. I'd also recommend you downloading the code-library sample project where this is demonstrated.

    If you require any further assistance please feel free to contact us back.

    All the best,
    Zoran
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  5. OC
    OC avatar
    2 posts
    Member since:
    Nov 2004

    Posted 30 Mar 2009 Link to this post

    Thanks, this works, but have one huge drawback, all nodes is repeated at the root level. I don't want that. They should only display in the hierarcy where they're supposed to be.

    OC
  6. Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 31 Mar 2009 Link to this post

    Hi Mutantmannen,

    This issue should be solved in the filter part of the datasource. The filtering column should be the one that defines the hierarchy and the filtering argument should be null. For example in the employee table the data should be filtered by ReportsTo and the source for the filter should be none. That way the treeview will present only the instance of the employee that has no boss (no one to report to) at root level.

    If you still have problems achieving this you could send us a sample project and we will be glad to do this small implementation for you.

    Best wishes,
    Zoran
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Back to Top