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

Self Referencing Grid

1 Answer 35 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Josef asked on 23 Jan 2009, 07:06 AM
I'm unable to get any output ie no sign of the gird.  I've copied the settings from the demo except that I have pointed the grid at a stored procedure on a SQL server.  The datasource confirms that just over 400 data rows are being returned

   <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" OnColumnCreated="RadGrid1_ColumnCreated"
        OnItemCreated="RadGrid1_ItemCreated" OnItemDataBound="RadGrid1_ItemDataBound"
        ShowHeader="true" ShowDesignTimeSmartTagMessage="False" ShowStatusBar="True" AutoGenerateColumns="true">
        <HeaderContextMenu  EnableTheming="True">
            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
        <MasterTableView HierarchyLoadMode="Client" AllowSorting="true"  
             DataKeyNames="AllocatedUnitID,AllocatedUnitParentID" Width="100%">
            <SelfHierarchySettings ParentKeyName="AllocatedUnitParentID" KeyName="AllocatedUnitID" />
                <HeaderStyle Width="20px"></HeaderStyle>
                <HeaderStyle Width="20px"></HeaderStyle>
        <ClientSettings AllowExpandCollapse="true" />
        <FilterMenu  EnableTheming="True">
            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DEPT_PerformanceReportingConnectionString %>"
        SelectCommand="usp_GetRawPMForOrgHierarchy" SelectCommandType="StoredProcedure">
            <asp:Parameter DefaultValue="7" Name="OrgandiationId" Type="Int32" />
            <asp:Parameter Name="fromDate" Type="DateTime" />
            <asp:Parameter Name="ToDate" Type="DateTime" />

1 Answer, 1 is accepted

Sort by
Georgi Krustev
Telerik team
answered on 26 Jan 2009, 07:35 PM
Hello Josef,

I reviewed your code snippet and everything seems to be fine. Please verify that the data has the required schema. In other words you need to add the fields from the grid source which defines the parent/child relations to the DataKeyNames array of the MasterTableView.

If the problem persists, I suggest you to open a regular support ticket and attach a working test project which reproduce this issue.

All the best,
Georgi Krustev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Asked by
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question