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

RadGrid Details table won't load on HierarchyDefaultExpanded="true"

1 Answer 208 Views
Grid
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 26 Oct 2011, 03:50 PM

No idea why my details tables won't load.  If I comment out the code in the rgDefects_PreRender event.  I just get blank details tables.  If enable the code in PreRender then I get the details table headers to show but no records UNTIL i click one of the the row expand buttons.  When I do that, the entire grid loads all the details correctly and shows all detail records.  Very confused on why I can't get the details to load on initial grid bind.  Can anyone point anything out?

Thanks in advance!

using System;
using System.Collections.Generic;
using System.Linq;
using System.Data.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using Bird.GlobalDatabase;
using Telerik.Web.UI;
using System.Data.SqlClient;
using System.Data;
using System.Web.SessionState;
using System.Text;
 
namespace BDT
{
    public partial class _default : System.Web.UI.Page
    {
 
        protected void Page_Load(object sender, EventArgs e)
        {
 
            rddTech.Filter = RadComboBoxFilter.Contains;
             
            if (Globals.UserName == "" || Globals.UserName == null)
            {
                try
                {
                    if (!Globals.validateUser())
                        Response.Redirect("unauthorized.aspx");
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
 
            if (Globals.dtSerials.Columns.Count <= 0)
            {
                Globals.dtSerials.Columns.Add("SERIAL_NBR");
            }
 
        }
 
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            SqlConnection sqlConn = null;
            SqlDataAdapter sqlDa = null;
            DataTable sqlDt = null;
            SqlCommand sqlCmd = new SqlCommand();
 
            try
            {
                lbSnSelected.Items.Clear();
 
                sqlConn = GlobalDatabase.CreateSqlConnection(GlobalDatabase.gintAvanteDW);
                sqlCmd.Connection = sqlConn;
                sqlCmd.CommandType = System.Data.CommandType.StoredProcedure;
 
                sqlCmd.Parameters.Add(new SqlParameter("@WoSerial", System.Data.SqlDbType.VarChar));
                sqlCmd.Parameters["@WoSerial"].Value = txtWoSerial.Text;
 
                sqlCmd.CommandText = "sp_GET_PART_BY_WO_SERIAL";
                sqlConn.Open();
                sqlDa = new SqlDataAdapter(sqlCmd);
                sqlDt = new DataTable();
 
                sqlDa.Fill(sqlDt);
 
                if (sqlDt.Rows.Count > 0)
                {
                    lbSnResults.DataSource = sqlDt;
                    lbSnResults.DataTextField = "SERIAL_NBR";
                    lbSnResults.DataValueField = "SERIAL_NBR";
                    lbSnResults.DataBind();
                     
 
                    lblItemNbr.Text = sqlDt.Rows[0]["ITEM_NBR"].ToString();
                    lblWoNbr.Text = sqlDt.Rows[0]["WO_NBR"].ToString();
                     
                    lblItemNbr.Visible = true;
                    lblItemNbrLbl.Visible = true;
                    lblWoNbrLbl.Visible = true;
                    lblWoNbr.Visible = true;
                    plResults.Visible = true;
 
                    ddRefDes.DataBind();
                }
                else
                {
                    lblItemNbr.Visible = false;
                    lblItemNbrLbl.Visible = false;
                    lblWoNbrLbl.Visible = false;
                    lblWoNbr.Visible = false;
                    plResults.Visible = false;
                }
 
            }
            catch (Exception ex)
            {
                throw ex;
            }
 
        }
 
        protected void rddTech_DataBound(object sender, EventArgs e)
        {
            RadComboBoxItem item = new RadComboBoxItem();
            item.Value = "";
            item.Text = "";
            rddTech.Items.Add(item);
        }
 
        protected void lbSnResults_PreRender(object sender, EventArgs e)
        {
            if (lbSnResults.Items.Count() == 1)
            {
                RadListBoxItem founditem = lbSnResults.Items[0];
                lbSnResults.Transfer(founditem, lbSnResults, lbSnSelected);
            }
 
        }
 
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            //    DataRow dr;
 
            //    dr = Globals.dtDefects.NewRow();
            //    dr["TEST_CD"] = ddTest.SelectedValue;
            //    dr["TEST_DESC"] = ddTest.SelectedItem.Text;
            //    dr["REF_DESIGNATOR"] = ddRefDes.SelectedValue;
            //    dr["DEFECT_CD"] = ddDefect.SelectedValue;
            //    dr["DEFECT_DESC"] = ddDefect.SelectedItem.Text;
 
            //    Globals.dtDefects.Rows.Add(dr);
 
            //ddTest.SelectedIndex = 0;
            //ddRefDes.SelectedIndex = 0;
            //ddDefect.SelectedIndex = 0;
 
            //rgDefects.DataSource = Globals.dtDefects;
            //rgDefects.DataBind();
        }
 
        protected void ddTest_DataBound(object sender, EventArgs e)
        {
            ListItem li = new ListItem();
            li.Value = "";
            li.Text = "Choose Test";
            ddTest.Items.Insert(0, li);
        }
 
        protected void ddRefDes_DataBound(object sender, EventArgs e)
        {
            ListItem li = new ListItem();
            li.Value = "";
            li.Text = "Choose Ref Des";
            ddRefDes.Items.Insert(0, li);
        }
 
        protected void ddDefect_DataBound(object sender, EventArgs e)
        {
            ListItem li = new ListItem();
            li.Value = "";
            li.Text = "Choose Defect";
            ddDefect.Items.Insert(0, li);
        }
 
        protected void rgDefects_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            //rgDefects.DataSource = Globals.dtSerials;
        }
 
        protected void lbSnResults_Transferred(object sender, RadListBoxTransferredEventArgs e)
        {
            DataRow dr;
            Globals.dtSerials.Clear();
 
            Session["SelectedSerialNbrs"] = "";
 
            foreach (RadListBoxItem i in this.lbSnSelected.Items)
            {
                if (i.Value != "")
                {
                    dr = Globals.dtSerials.NewRow();
                    dr["SERIAL_NBR"] = i.Value;
                     
                    Globals.dtSerials.Rows.Add(dr);
                }               
            }
 
            Session["SelectedSerialNbrs"] = Globals.dtSerials;
 
            SqlConnection sqlConn = null;
            SqlDataAdapter sqlDa = null;
            DataTable sqlDt = null;
            SqlCommand sqlCmd = new SqlCommand();
 
            try
            {
                sqlConn = GlobalDatabase.CreateSqlConnection(GlobalDatabase.gintBDT);
                sqlCmd.Connection = sqlConn;
                sqlCmd.CommandType = System.Data.CommandType.StoredProcedure;
 
                sqlCmd.Parameters.Add(new SqlParameter("@SerialNumbers", System.Data.SqlDbType.Structured));
                sqlCmd.Parameters["@SerialNumbers"].Value = Globals.dtSerials;
 
                sqlCmd.CommandText = "sp_GET_SERIAL_NBRS";
                sqlConn.Open();
                sqlDa = new SqlDataAdapter(sqlCmd);
                sqlDt = new DataTable();
 
                sqlDa.Fill(sqlDt);
 
                if (sqlDt.Rows.Count > 0)
                {
                    rgDefects.DataSource = Globals.dtSerials;
                    rgDefects.Rebind();
                }
 
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 
        protected void rgDefects_ItemDataBound(object sender, GridItemEventArgs e)
        {
            ////DEBUGGING ONLY CODE BELOW
            //try
            //{
            //    if (e.Item is GridDataItem)
            //    {
            //        //int repId = 0;
 
            //        GridDataItem dataItem = e.Item as GridDataItem;
 
            //        //GridDataItem item = (GridDataItem)e.Item;
            //        //repId = Convert.ToInt32(item.GetDataKeyValue("SERIAL_NBR"));
 
            //    }
            //    if (e.Item is GridFooterItem)
            //    {
 
            //    }
            //}
            //catch (Exception ex)
            //{
 
            //}
             
        }
 
        protected void rgDefects_DetailTableDataBind(object sender, GridDetailTableDataBindEventArgs e)
        {           
            e.DetailTableView.DataSource = dsDefects;
        }
 
        protected void rgDefects_PreRender(object sender, EventArgs e)
        {
            //if (rgDefects.MasterTableView.Items.Count > 0)
            //{
            //    foreach (GridDataItem dataItem in rgDefects.MasterTableView.Items)
            //    {
 
            //        GridTableView tv = (GridTableView)dataItem.ChildItem.NestedTableViews[0];
            //        tv.Rebind();
            //        dataItem.Expanded = true;                   
 
            //    }
            //}
        }
 
    }
}

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="BDT._default" %>
 
<%@ Register assembly="Telerik.Web.UI, Version=2011.2.915.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<%@ Register TagPrefix="uc" TagName="MenuBar" Src="menu.ascx" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>   
    <script type="text/javascript">
 
        function openpopup(mypage, myname, features) {
            win = window.open(mypage, myname, features);
            win.window.focus();
 
        }
 
        Sys.Application.add_load(function() {
            var listBox = $find("lbSnResults");
            var $ = $telerik.$;
             
            if (listBox != null)
            {
                $(".rlbItem", listBox._getGroupElement())
               .click(function(event) {
                   event.stopImmediatePropagation();
                   event.ctrlKey = true;
                   listBox._onClick(event);
               });
           }
       });
 
       Sys.Application.add_load(function() {
           var listBox = $find("lbSnSelected");
           var $ = $telerik.$;
 
           if (listBox != null) {
               $(".rlbItem", listBox._getGroupElement())
               .click(function(event) {
                   event.stopImmediatePropagation();
                   event.ctrlKey = true;
                   listBox._onClick(event);
               });
           }
       });       
           
    </script>    
      
    <UC:MenuBar id="ucMenu" runat="server" />
    <div>
                 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadAjaxPanel1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
     
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" height="200px" width="100%" >
            <asp:SqlDataSource ID="QisDataSource" runat="server"
                ConnectionString="<%$ ConnectionStrings:QISConnectionString %>"
                SelectCommand="sp_GET_TECHNICIANS" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
            <asp:SqlDataSource ID="dsGetRefDes" runat="server"
                ConnectionString="<%$ ConnectionStrings:AvanteDWConnectionString %>"
                SelectCommand="sp_GET_REF_DES_BY_ITEM" SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:ControlParameter ControlID="lblItemNbr" Name="Item" PropertyName="Text"
                        Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>
            <asp:SqlDataSource ID="SearchResultsDataSource" runat="server"
                ConnectionString="<%$ ConnectionStrings:AvanteDWConnectionString %>"
                SelectCommand="sp_GET_PART_BY_WO_SERIAL" SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:ControlParameter ControlID="txtWoSerial" Name="WoSerial"
                        PropertyName="Text" Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>
            <asp:SqlDataSource ID="dsDefects" runat="server"
                ConnectionString="<%$ ConnectionStrings:BDTConnectionString %>"
                SelectCommand="sp_GET_DEFECTS_LVL2" SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:Parameter Name="SERIAL_NBR" Type="String" />
                </SelectParameters>   
            </asp:SqlDataSource>
            <asp:SqlDataSource ID="dsSerials" runat="server"
                ConnectionString="<%$ ConnectionStrings:BDTConnectionString %>"
                SelectCommand="sp_GET_SERIAL_NBRS" SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:SessionParameter Name="SerialNumbers" SessionField="SelectedSerialNbrs"
                        Type="Object" />
                </SelectParameters>
            </asp:SqlDataSource>
            <br />
            <table width="100%" style="border-bottom:solid 2px #bbc1c9; border-top:solid 2px #bbc1c9;" >
                <tr>
                    <td width="5px"></td>
                    <td width="140px">Employee ID:</td>
                    <td width="200px">
                        <telerik:RadComboBox ID="rddTech" runat="server" Width="95%"
                            DataSourceID="QisDataSource" DataTextField="FULL_DISPLAY" DataValueField="employee_id"
                            HighlightTemplatedItems="true" EmptyMessage="Please Select"
                            MarkFirstMatch="true" ondatabound="rddTech_DataBound">
                        </telerik:RadComboBox></td>
                    <td width="100px"></td>
                    <td width="50px">
                        <asp:Label ID="lblItemNbrLbl" runat="server" Visible="false" Text="Item #:"></asp:Label></td>
                    <td>
                        <asp:Label ID="lblItemNbr" runat="server" Visible="false"></asp:Label></td>
                </tr>
                <tr>
                    <td></td>
                    <td>Work Order/Serial #</td>
                    <td>
                        <asp:TextBox ID="txtWoSerial" Width="93%" runat="server"></asp:TextBox></td>
                    <td>
                        <asp:Button ID="btnSearch" runat="server" Text="Search"
                            onclick="btnSearch_Click" /></td>
                    <td>
                        <asp:Label ID="lblWoNbrLbl" runat="server" Visible="false" Text="WO #:"></asp:Label></td>                   
                    <td>
                        <asp:Label ID="lblWoNbr" runat="server" Visible="false"></asp:Label></td>                   
                </tr>               
            </table>
            <br />
            <asp:Panel ID="plResults" runat="server" Visible="true">
            <table width="100%" border="0px">
                <tr>
                    <td width="375px" valign="top">
                        <table width="375px" border="0px">
                            <tr>
                                <td width="5px"></td>
                                <td width="145px"><asp:Label ID="lblSelectMsg" runat="server" Text="Select Serial #'s" Visible="true"></asp:Label></td>
                                <td width="25px"></td>
                                <td><asp:Label ID="lblApplyMsg" runat="server" Text="Apply Defect(s) To" Visible="true"></asp:Label></td>
                            </tr>
                            <tr>
                                <td width="5px"></td>
                                <td colspan="3">
                                    <telerik:RadListBox ID="lbSnResults" runat="server" Visible="true"
                                        Height="200" Width="175px" SelectionMode="Multiple" AllowTransfer="true"
                                        TransferToID="lbSnSelected" onprerender="lbSnResults_PreRender"
                                        ontransferred="lbSnResults_Transferred" AutoPostBackOnTransfer="True">
                                    <buttonsettings transferbuttons="All" />
                                    </telerik:RadListBox>
                                    <telerik:RadListBox runat="server" ID="lbSnSelected"
                                        Height="200px" Width="150px" AutoPostBack="True" SelectionMode="Multiple"
                                        AutoPostBackOnTransfer="True" AutoPostBackOnReorder="True"
                                        AutoPostBackOnDelete="True">
                                        <buttonsettings transferbuttons="All" />
                                    </telerik:RadListBox>
                                </td>
                            </tr>               
                        </table>
                    </td>
                    <td align="left" valign="top">
                        <table border="0px" width="500px" style="border-bottom:solid 2px #bbc1c9;">
                            <tr>
                                <td width="100px">Finding Area:</td>
                                <td width="150px"><asp:DropDownList ID="ddFindingArea" runat="server" Width="100%">
                                        <asp:ListItem Value="" Text=""></asp:ListItem>
                                        <asp:ListItem Value="PCBA" Text="PCBA"></asp:ListItem>
                                        <asp:ListItem Value="INST" Text="Instrumentation"></asp:ListItem>
                                    </asp:DropDownList></td>
                                <td width="20px"></td>
                                <td width="100px">Rework Ord #:</td>
                                <td width="100px"><asp:TextBox ID="txtReworkOrd" Width="100%" runat="server"></asp:TextBox></td>                                   
                                <td></td>
                            </tr>
                        </table>
                        <table border="0px" width="100%">
                            <tr>
                                <td> </td>
                            </tr>
                            <tr>
                                <td width="40px">Test:</td>
                                <td width="150px">
                                    <asp:DropDownList ID="ddTest" runat="server" width="90%"
                                        ondatabound="ddTest_DataBound">
                                        <asp:ListItem Value="" Text="Choose Test"></asp:ListItem>
                                        <asp:ListItem Value="TA" Text="Test A"></asp:ListItem>   
                                        <asp:ListItem Value="TB" Text="Test B"></asp:ListItem>
                                        <asp:ListItem Value="TC" Text="Test C"></asp:ListItem>
                                    </asp:DropDownList></td>
                                <td width="60px">Ref Des:</td>
                                <td width="150px">
                                    <asp:DropDownList ID="ddRefDes" runat="server" width="90%"
                                        DataSourceID="dsGetRefDes" DataTextField="REF_DESIGNATOR"
                                        DataValueField="REF_DESIGNATOR" ondatabound="ddRefDes_DataBound">
                                    </asp:DropDownList></td>
                                <td width="50px">Defect:</td>
                                <td width="150px">
                                    <asp:DropDownList ID="ddDefect" runat="server" width="90%"
                                        ondatabound="ddDefect_DataBound">
                                        <asp:ListItem Value="" Text="Choose Defect"></asp:ListItem>
                                        <asp:ListItem Value="DA" Text="Defect A"></asp:ListItem>   
                                        <asp:ListItem Value="DB" Text="Defect B"></asp:ListItem>
                                        <asp:ListItem Value="DC" Text="Defect C"></asp:ListItem>                                   
                                    </asp:DropDownList></td>
                                <td><asp:Button ID="btnAdd" runat="server" Text="Add" onclick="btnAdd_Click" /></td>
                            </tr>                           
                        </table>                       
                        <br />
                        <table border="0px" width="100%" style="border-bottom:solid 0px #bbc1c9;">
                            <tr>
                                <td valign="top" width="50%">
                                    <telerik:RadGrid ID="rgDefects" runat="server" GridLines="None" Skin="WebBlue"
                                        BorderStyle="None" ShowStatusBar="True"
                                        onneeddatasource="rgDefects_NeedDataSource"
                                        CellSpacing="0" OnItemDataBound="rgDefects_ItemDataBound"
                                        ondetailtabledatabind="rgDefects_DetailTableDataBind"
                                        onprerender="rgDefects_PreRender">
                                        <headercontextmenu cssclass="GridContextMenu GridContextMenu_WebBlue"></headercontextmenu>
                                        <mastertableview autogeneratecolumns="False" datakeynames="SERIAL_NBR"
                                            tablelayout="Auto" HierarchyDefaultExpanded="True" HierarchyLoadMode="ServerBind">
                                            <detailtables>
                                                <telerik:GridTableView runat="server" AllowFilteringByColumn="False"
                                                    AutoGenerateColumns="false" CommandItemDisplay="None"
                                                    DataKeyNames="SERIAL_NBR" DataSourceID="dsDefects">
                                                    <parenttablerelation>
                                                        <telerik:GridRelationFields DetailKeyField="SERIAL_NBR"
                                                            MasterKeyField="SERIAL_NBR" />
                                                    </parenttablerelation>
                                                    <commanditemsettings exporttopdftext="Export to PDF" />
                                                    <rowindicatorcolumn filtercontrolalttext="Filter RowIndicator column">
                                                    </rowindicatorcolumn>
                                                    <expandcollapsecolumn filtercontrolalttext="Filter ExpandColumn column">
                                                    </expandcollapsecolumn>
                                                    <Columns>
                                                        <telerik:GridBoundColumn DataField="TEST_DESC" HeaderText="Test"
                                                            SortExpression="TEST_DESC" UniqueName="TEST_DESC">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="TEST_CD" HeaderText="Test"
                                                            SortExpression="TEST_CD" UniqueName="TEST_CD" Visible="TRUE">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="REF_DESIGNATOR"
                                                            HeaderText="Reference Designator" SortExpression="REF_DESIGNATOR"
                                                            UniqueName="REF_DESIGNATOR">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="DEFECT_DESC" HeaderText="Defect"
                                                            SortExpression="DEFECT_DESC" UniqueName="DEFECT_DESC">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="DEFECT_CD" HeaderText="Defect"
                                                            SortExpression="DEFECT_CD" UniqueName="DEFECT_CD" Visible="TRUE">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="USER_UPDATED" HeaderText="USER_UPDATED"
                                                            SortExpression="USER_UPDATED" UniqueName="USER_UPDATED" Visible="False">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="DATE_ENTERED" DataType="System.DateTime"
                                                            HeaderText="DATE_ENTERED" SortExpression="DATE_ENTERED"
                                                            UniqueName="DATE_ENTERED">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridClientDeleteColumn ButtonType="LinkButton"
                                                            ConfirmText="Are you sure u want to delete?" Text="Delete">
                                                        </telerik:GridClientDeleteColumn>
                                                    </Columns>
                                                    <editformsettings>
                                                        <editcolumn filtercontrolalttext="Filter EditCommandColumn column">
                                                        </editcolumn>
                                                    </editformsettings>
                                                </telerik:GridTableView>
                                            </detailtables>
                                            <commanditemsettings exporttopdftext="Export to PDF" />
                                            <rowindicatorcolumn filtercontrolalttext="Filter RowIndicator column">
                                            </rowindicatorcolumn>
                                            <expandcollapsecolumn visible="True">
                                            </expandcollapsecolumn>
                                            <Columns>
                                                <telerik:GridBoundColumn DataField="SERIAL_NBR" HeaderText="Serial #"
                                                    SortExpression="SERIAL_NBR" UniqueName="SERIAL_NBR">
                                                </telerik:GridBoundColumn>
                                            </Columns>
                                            <editformsettings>
                                                <editcolumn filtercontrolalttext="Filter EditCommandColumn column">
                                                </editcolumn>
                                            </editformsettings>
                                        </mastertableview>
                                        <filtermenu enableimagesprites="False">
                                        </filtermenu>
                                    </telerik:RadGrid>                                   
                                </td>
                            </tr>
                        </table>                       
                    </td>      
                </tr>
            </table>
            </asp:Panel>    
        </telerik:RadAjaxPanel>
                            
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel" runat="server"
            height="200px" width="100%" Transparency="0" IsSticky="True" Skin="WebBlue" >
        </telerik:RadAjaxLoadingPanel>       
         
        <br />
    </div>
    </form>
</body>
</html>

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 31 Oct 2011, 10:41 AM
Hello James,

The RadGrid does not support assigning the DataSource control's ID to the DataSource property of the GridtableView. Please check out the following online example which shows how to populate the detail table with data:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/detailtabledatabind/defaultcs.aspx
Additionally please note that the RadGrid does not support hierarchy when it is bound with simple data binding. In order to achieve the desired functionality you need to pass the data to the DataSource property of the RadGrid into the NeedDataSource event. More information you could find here:
http://www.telerik.com/help/aspnet-ajax/grid-advanced-data-binding.html
Additionally in the provided code snippet I saw that you use both the RadAjaxManager and RadAjaxPanel, however we do not support such a scenario and you need to remove one of them.

I hope this helps.

Regards,
Radoslav
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
Grid
Asked by
James
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or