SQL DataBinding

2 posts, 0 answers
  1. Alex
    Alex avatar
    10 posts
    Member since:
    Jul 2012

    Posted 08 Jun 2014 Link to this post


    I am trying to get a RadTreeView to display some very basic data from a SQL Database.

    The data is already filtered from the SQL Server so what ever the SQL Server finds, I want to display it all. There is no sort of Row 1 links with Row 2. They are all unique.
    The format of the query is
    ID, Date, Description.

    What I am trying to do is get the Date displayed in the first node, and when it has been clicked, I would want the Description to be down below it.

    I have attached a sample image on how it looks now.

    My current code is very basic which is below.

    <telerik:RadTreeView runat="server" ID="RadTreeView2" Skin="Metro" DataSourceID="GetNotesTicket" datatextfield="Date">

    I have played around with trying to use DataBindings and Notes. As well as trying to use DataFieldID, DataValueField but still not happening.

    I ideally would want to display it in a Template the Description so that the user can edit the data using a RadFormWindow so I would be putting some buttons in there to.

    This is the closest example I can find on how I want it to work until I start looking at the button clicks. Link

    Any help would be useful.



  2. Plamen
    Plamen avatar
    3025 posts

    Posted 10 Jun 2014 Link to this post

    Hello Alex,

    You should handle the DataFieldID and DataFieldParentID  fields of RadTreeView so that the nodes are generated properly. Please have in mind that the ParentId of the root items (dates in your case) should be Null. You can refer to this help topic where this binding is displayed in details.

    As for your second issue you can refer to this help topic where is explained how you can add and edit templates in the code behind.

    Hope this information will be helpful.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top