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

No sub rows showing

3 Answers 55 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Justin
Top achievements
Rank 1
Justin asked on 11 Oct 2012, 07:26 PM
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" />

3 Answers, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 13 Oct 2012, 10:24 AM
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.
0
Justin
Top achievements
Rank 1
answered on 15 Oct 2012, 08:05 PM
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.
0
Angel Petrov
Telerik team
answered on 16 Oct 2012, 10:49 AM
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.
Tags
TreeList
Asked by
Justin
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Justin
Top achievements
Rank 1
Share this question
or