No sub rows showing

4 posts, 0 answers
  1. Justin
    Justin avatar
    8 posts
    Member since:
    Jul 2008

    Posted 11 Oct 2012 Link to this post

    I have a RadTreeList setup that uses a generic list as its datasource. I have a parent and id columns and I verified that parent = id. I set the parent's id column to null.

    The only thing that shows in the treelist is the parent row no children, no expand arrow. The datasource is has data. I get no errors.

    Any ideas?

    Here's my DataSource:
    Dim geoDataList As List(Of FacilitiesList) = ds.GetDistanceGridFacilities(oLat, oLon, radius, facilityNumber)

            RadGeoTreeList.DataSource = geoDataList
            RadGeoTreeList.DataBind()

    Here's the TreeList:
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel" runat="server">
                <telerik:RadTreeList runat="server" ID="RadGeoTreeList" Visible="true" DataKeyNames="FacilitiesreportingId" ParentDataKeyNames="VERA3" AutoGenerateColumns="false" 
                Width="100%" Height="400" ShowTreeLines="true">
                    <Columns>
                        <telerik:TreeListBoundColumn DataField="FinanceNumber" HeaderText="Finance Number" UniqueName="FinanceNumber"></telerik:TreeListBoundColumn>
                        <telerik:TreeListBoundColumn DataField="Origin" HeaderText="Origin" UniqueName="Origin"></telerik:TreeListBoundColumn>
                        <telerik:TreeListBoundColumn DataField="Destination" HeaderText="Destination" UniqueName="Destination"></telerik:TreeListBoundColumn>
                        <telerik:TreeListBoundColumn DataField="Address" HeaderText="Address" UniqueName="Address"></telerik:TreeListBoundColumn>
                        <telerik:TreeListBoundColumn DataField="City" HeaderText="City" UniqueName="City"></telerik:TreeListBoundColumn>
                        <telerik:TreeListBoundColumn DataField="State" HeaderText="State" UniqueName="State"></telerik:TreeListBoundColumn>
                        <telerik:TreeListBoundColumn DataField="ZipCode" HeaderText="Zip" UniqueName="ZipCode"></telerik:TreeListBoundColumn>
                        <telerik:TreeListBoundColumn DataField="Distance" HeaderText="Driving Distance" UniqueName="Distance"></telerik:TreeListBoundColumn>
                        <telerik:TreeListBoundColumn DataField="Area" HeaderText="Area" UniqueName="Area"></telerik:TreeListBoundColumn>
                        <telerik:TreeListBoundColumn DataField="PFC" HeaderText="PFC" UniqueName="PFC"></telerik:TreeListBoundColumn>
                        <telerik:TreeListBoundColumn DataField="OnRolls1" HeaderText="OnRolls" UniqueName="OnRolls"></telerik:TreeListBoundColumn>
                        <telerik:TreeListBoundColumn DataField="Residual" HeaderText="Residual" UniqueName="Residual"></telerik:TreeListBoundColumn>
                        <telerik:TreeListBoundColumn DataField="Withheld" HeaderText="Withheld" UniqueName="Withheld"></telerik:TreeListBoundColumn>
                        <telerik:TreeListBoundColumn DataField="Optional1" HeaderText="OPT" UniqueName="Optional1"></telerik:TreeListBoundColumn>
                        <telerik:TreeListBoundColumn DataField="VERA1" HeaderText="VER" UniqueName="VERA1"></telerik:TreeListBoundColumn>
                        <telerik:TreeListBoundColumn DataField="VERA3" HeaderText="VERA3" UniqueName="VERA3"></telerik:TreeListBoundColumn>
                        <telerik:TreeListBoundColumn DataField="FacilitiesreportingId" HeaderText="FacilitiesreportingId" UniqueName="FacilitiesreportingId"></telerik:TreeListBoundColumn>
                    </Columns>
                </telerik:RadTreeList>
            </telerik:RadAjaxPanel>
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel" runat="server" />
  2. Angel Petrov
    Admin
    Angel Petrov avatar
    1007 posts

    Posted 13 Oct 2012 Link to this post

    Hi Justin,

    Setting the parent's id column to null will break the parent-child relation. By doing that you explicitly determine that the parent has no successors. More about the RadTreeList structure you can find in the following article.

    Regards,
    Angel Petrov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Justin
    Justin avatar
    8 posts
    Member since:
    Jul 2008

    Posted 15 Oct 2012 Link to this post

    Sorry I meant to say that the child Id of the parent is set to 0.

    The problem ended up being nullable integers in my id columns, apparently that is a no-no.

    I dont have the treelist completely working yet though. when I click the expand node the treelist disappears.

    I will open a new thread for that.
  5. Angel Petrov
    Admin
    Angel Petrov avatar
    1007 posts

    Posted 16 Oct 2012 Link to this post

    Hello Justin,

    Nullable integers in the id columns are supported by RadTreeList. I have created a simple solution using the aforementioned type. The root parent has id set to 0. You can find the project in the attachments.

    All the best,
    Angel Petrov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top