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

[Solved] Detail table will not display

10 Answers 531 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 2
Dan asked on 30 Dec 2008, 02:54 PM
I am using the DetailTableDataBind event for binding my Detail table, and it appears to work properly in debug, but the grid row will not expand.  When I click on the expand icon, the loading icon appears bit the row does not expand.  What am I missing?

Code:

<%@ Page Language="C#" MasterPageFile="~/Master/UserPages.master" AutoEventWireup="true"
CodeFile="lkup_pronotes2.aspx.cs" Inherits="Lookup_lkup_pronotes2" %>

<%@ Register Assembly="RadAjax.Net2" Namespace="Telerik.WebControls" TagPrefix="radA" %>
<%@ Register Assembly="RadInput.Net2" Namespace="Telerik.WebControls" TagPrefix="radI" %>
<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="radG" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphWebData" runat="Server">

    <div class='content'>
        <radA:RadAjaxPanel ID="RadAjaxPanel1" LoadingPanelID="AjaxLoadingPanel1" runat="server"
            Height="100%" Width="100%">
        <radg:radgrid  ID="RadGrid1" runat="server" OnDetailTableDataBind="RadGrid1_DetailTableDataBind"
            AllowExpandCollapse="true" AllowMultiRowSelection="false">
            <MasterTableView CommandItemDisplay="Bottom">
                <%-- <EditFormSettings EditFormType="Template">
                    <FormTemplate>
                        <table style="width: 80%" align="center">
                        </table>
                    </FormTemplate>
                </EditFormSettings> --%>
                <Columns>
                    <radG:GridBoundColumn HeaderText="ID" UniqueName="cpk_pronotes" DataField="cpk_pronotes" Display="False" ReadOnly="True" />
                    <radG:GridBoundColumn HeaderText="Entered" UniqueName="date_" DataField="date_" HeaderButtonType="TextButton" />
                    <radG:GridBoundColumn HeaderText="Entered By" UniqueName="username" DataField="username" HeaderButtonType="TextButton" />
                    <radG:GridBoundColumn HeaderText="Subject" UniqueName="subject" DataField="subject" HeaderButtonType="TextButton" />
                    <radG:GridBoundColumn HeaderText="F/U Date" UniqueName="followup" DataField="followup" DataFormatString="{0:d}" HeaderButtonType="TextButton" />
                    <radG:GridBoundColumn HeaderText="F/U Assigned To..." UniqueName="funame" DataField="funame" HeaderButtonType="TextButton" />
                    <radG:GridBoundColumn HeaderText="F/U Complete" UniqueName="fudone" DataField="fudone" HeaderButtonType="TextButton" />
                    <%-- <radG:GridButtonColumn ButtonType="PushButton" Text="Edit" CommandName="Edit" UniqueName="edit" />
                    <radG:GridButtonColumn ButtonType="PushButton" Text="Delete" CommandName="Delete" UniqueName="delete" /> --%>
                </Columns>
                <DetailTables>
                    <radG:GridTableView DataKeyNames="cpk_pronotes">
                        <Columns>
                            <radG:GridBoundColumn HeaderText="ID"  DataField="cpk_pronotes" Display="False" ReadOnly="True" />
                            <radG:GridBoundColumn HeaderText="Notes" UniqueName="notes" DataField="notes" HeaderButtonType="TextButton" />
                        </Columns>
                    </radG:GridTableView>
                </DetailTables>
                <CommandItemTemplate>
                    <asp:Button ID="btnInsert" CommandName="InitInsert"
                        runat="server" Text="Add Item" />
                    <asp:Button ID="btnRefresh" CommandName="RebindGrid"
                        runat="server" Text="Refresh List" />
                </CommandItemTemplate>
            </MasterTableView>
            <HeaderStyle Font-Bold="True" Font-Size="14px" Font-Underline="False" HorizontalAlign="Left" />
            <ItemStyle Font-Size="12px" />
            <AlternatingItemStyle Font-Size="12px" />
        </radg:radgrid>
           
        </radA:RadAjaxPanel>
        <radA:AjaxLoadingPanel ID="AjaxLoadingPanel1" runat="server" Height="75px" Width="75px">
            <asp:Image ID="Image1" runat="server" AlternateText="Loading..." ImageUrl="~/RadControls/Ajax/Skins/Default/Loading3.gif" />
        </radA:AjaxLoadingPanel>
    </div>
    <asp:SqlDataSource ID="dsParent" runat="server" DataSourceMode="DataReader" ConflictDetection="CompareAllValues"
        OldValuesParameterFormatString="Original_{0}" OnUpdating="dsParent_RecordChanged"></asp:SqlDataSource>
    <asp:SqlDataSource ID="dsDetails" runat="server" DataSourceMode="DataReader"></asp:SqlDataSource>
</asp:Content>
-----------------------------------------------

using System;
using System.Web.UI.WebControls;
using SQLDataAccess;
using Telerik.WebControls;

public partial class Lookup_lkup_pronotes2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        WP_Utility wpUtility = new WP_Utility();
        wpUtility.GridDefaults(RadGrid1);

        SqlBuilder sbCommand = new SqlBuilder();
        dsParent.ConnectionString = sbCommand.GetConnectionString();
        dsParent.SelectCommand = "wa_ProgressNotesList";
        dsParent.SelectCommandType = SqlDataSourceCommandType.StoredProcedure;
        if (!IsPostBack)
        {
            SessionParameter spMrn = new SessionParameter("MRN", TypeCode.String, "MRN");
            dsParent.SelectParameters.Add(spMrn);
        }

        dsParent.DeleteCommand = "exec wa_ProgressNoteDelete @Original_CPK_PRONOTES";

        dsParent.UpdateParameters.Add("CPK_PRONOTES", TypeCode.Int32, "0");
        dsParent.UpdateParameters.Add("DATE_", TypeCode.String, "");
        dsParent.UpdateParameters.Add("USERNAME", TypeCode.String, "");
        dsParent.UpdateParameters.Add("SUBJECT", TypeCode.String, "");
        dsParent.UpdateParameters.Add("FOLLOWUP", TypeCode.String, "");
        dsParent.UpdateParameters.Add("FUNAME", TypeCode.String, "");
        dsParent.UpdateParameters.Add("FUDONE", TypeCode.String, "");

        //foreach (Parameter param in dsParent.UpdateParameters)
        //{
        //    if (param.Name.Length < 4 || !param.Name.Substring(0, 4).Equals("CPK_"))
        //        sbCommand.UpdateFields.Add(param.Name.ToUpper());
        //}

        dsParent.UpdateCommand = "wa_ProgressNoteUpdate";
        dsParent.UpdateCommandType = SqlDataSourceCommandType.StoredProcedure;

        dsParent.InsertParameters.Add("DATE_", TypeCode.String, "");
        dsParent.InsertParameters.Add("USERNAME", TypeCode.String, "");
        dsParent.InsertParameters.Add("SUBJECT", TypeCode.String, "");
        dsParent.InsertParameters.Add("FOLLOWUP", TypeCode.String, "");
        dsParent.InsertParameters.Add("FUNAME", TypeCode.String, "");
        dsParent.InsertParameters.Add("FUDONE", TypeCode.String, "");

        dsParent.InsertCommand = "wa_ProgressNoteInsert";
        dsParent.InsertCommandType = SqlDataSourceCommandType.StoredProcedure;

        RadGrid1.DataSourceID = "dsParent";
        RadGrid1.MasterTableView.DataKeyNames = new string[] { "cpk_pronotes" };
    }

    protected void RadGrid1_DetailTableDataBind(object source, Telerik.WebControls.GridDetailTableDataBindEventArgs e)
    {
        GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;
        //string strKey = dataItem["pk"].Text;
        string strKey = dataItem.GetDataKeyValue("cpk_pronotes").ToString();

        SqlBuilder sbCommand = new SqlBuilder();

        dsDetails.ConnectionString = sbCommand.GetConnectionString();

        dsDetails.SelectCommand = "wa_PatientPronotesDetails";
        dsDetails.SelectCommandType = SqlDataSourceCommandType.StoredProcedure;

        if (dsDetails.SelectParameters.Count < 1)
        {
            dsDetails.SelectParameters.Add("CPK_PRONOTES", TypeCode.Int32, strKey);
        }
        else
        {
            Parameter pFKey = new Parameter("CPK_PRONOTES", TypeCode.Int32, strKey);
            dsDetails.SelectParameters["CPK_PRONOTES"] = pFKey;
        }

        e.DetailTableView.DataSourceID = "dsDetails";
        e.DetailTableView.Width = Unit.Percentage(90);

    }

    protected void dsParent_RecordChanged(object sender, SqlDataSourceCommandEventArgs e)
    {
        string eventname = e.Command.CommandText.Substring(0, 6).ToUpper();
        string reason = "";
        string username = Session["LastName"].ToString() + "," + Session["FirstName"].ToString();
        switch (eventname)
        {
            case "UPDATE":
                //reason = "Patient Contact Information updated.";
                try
                {
                    int pk = Convert.ToInt32(e.Command.Parameters["@Original_CPK_PRONOTES"].Value);
                    DataAccess Data = new DataAccess("PRONOTES", "CPK_PRONOTES", pk);

                    Data.LogTransaction(e.Command.Parameters, "original_", Convert.ToInt32(Session["cpruser_no"]), reason, username);
                }
                catch (Exception oError)
                {
                    reason = oError.ToString();
                    reason = reason.Trim();
                }
                break;
            default:
                break;
        }
    }
}

Thanks for the help.  Dan

10 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 30 Dec 2008, 03:14 PM
Hello Dan,

Please use NeedDataSource to provide DataSource for the grid. You can check this example for more info:
http://demos.telerik.com/aspnet-ajax/Grid/Examples/Programming/DetailTableDataBind/DefaultCS.aspx

Sincerely yours,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Dan
Top achievements
Rank 2
answered on 30 Dec 2008, 04:11 PM
Vlad,

Will this work    using Telerik.WebControls ?

I ask because we're using the older ASP.NET controls, and I will have to recode quite a bit.

Also, will I be able to define my DataSource using my SqlBuilder component, rather than the sample GetDataTable routine,  as I will be using that for the dataset updates and deletes.

Mike
0
Accepted
Vlad
Telerik team
answered on 05 Jan 2009, 07:33 AM
Hello Dan,

Here is the same demo for RadGrid "Classic":
http://demos.telerik.com/aspnet/Grid/Examples/Programming/DetailTableDataBind/DefaultCS.aspx

Generally you can use any IEnumerable as grid DataSource or you can bind the grid via DataSourceID.

Greetings,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
John Davis
Top achievements
Rank 2
answered on 02 Apr 2009, 07:35 PM
I have the same problem. I tried

Method 1: using ObjectDataSource for both master detail, using a technique I got from a Telerik example. Actually everything works when I put the code into a simple version of my app, that I was preparing to submit as an incident.  But it does not work in my app.

Method 2: Also I tried the technique in http://demos.telerik.com/aspnet-ajax/grid/examples/programming/detailtabledatabind/defaultcs.aspx
by using NeedDataSource instead of ObjectDataSource for the detail table.

Method 3: Used code-behind for data source of both master/detail tables.

 

 

OnDetailTableDataBind="RadGrid1_DetailTableDataBind" 

 

 

 

 OnNeedDataSource="RadGrid1_NeedDataSource"

In both cases, when I click the "expand" icon, the code executes to get the data for the detail grid. In method 2, I can verify in the debugger that e.DetailTableView.DataSource has records.  But the detailed table does not display.

How can I fix or how can I debug this problem?

Steve

protected void RadGrid1_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)

 

{

 

GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;

 

 

 

switch (e.DetailTableView.Name)

 

{

 

 

case "DS1Detail":

 

{

 

 

 

 

 

e.DetailTableView.DataSource =

MgtPickLineManager.GetPickTicketsForOneDay(Convert.ToInt32(lblWarehouse_ID.Text), Convert.ToDateTime(dataItem.GetDataKeyValue("Day")));

 

 

 

 

 

 

 

break;

 

}

etc.

METHOD 1:

<rad:RadGrid ID="RadGrid1" Font-Size="Smaller" runat="server" PageSize="40" AllowPaging="True"
AutoGenerateColumns="False" ShowStatusBar="True" GridLines="None" MasterTableView-NoMasterRecordsText="No records; try different settings"
DataSourceID="MasterDatasource1" OnInit="RadGrid1_Init" AllowFilteringByColumn="True" AllowSorting="True"
Width="989px" OnItemCreated="RadGrid1_ItemCreated" >
<PagerStyle Mode="Slider" />
<ClientSettings>
<Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True">
</Scrolling>
</ClientSettings>
<MasterTableView AutoGenerateColumns="False" DataKeyNames="Day" TableLayout="fixed">
<ExpandCollapseColumn Visible="True"></ExpandCollapseColumn>
<Columns>
 <rad:GridDateTimeColumn DataField="Day" HeaderText="Day" UniqueName="Day" ReadOnly="true" DataFormatString="{0:d}" 
 PickerType="DatePicker" >
 <HeaderStyle Width="189px" />
 </rad:GridDateTimeColumn>
 <rad:GridBoundColumn DataField="MinPerPickTicket" HeaderText="MinPerPickTicket" UniqueName="MinPerPickTicket" ReadOnly="true" DataFormatString="{0:#,###.##}" >
 <HeaderStyle Width="100px" />
 </rad:GridBoundColumn>
 <rad:GridBoundColumn DataField="SecPerPickLin" HeaderText="SecPerPickLin" UniqueName="SecPerPickLin" ReadOnly="true" DataFormatString="{0:d}"   >
  <HeaderStyle Width="100px" />
 </rad:GridBoundColumn>
 <rad:GridBoundColumn DataField="SecPerQtyToPick" HeaderText="SecPerQtyToPick" UniqueName="SecPerQtyToPick" ReadOnly="true" DataFormatString="{0:d}"   >
  <HeaderStyle Width="100px" />
 </rad:GridBoundColumn>
 <rad:GridBoundColumn DataField="PickDuration" HeaderText="PickDuration" UniqueName="PickDuration" ReadOnly="true" >
  <HeaderStyle Width="100px" />
 </rad:GridBoundColumn>
 <rad:GridBoundColumn DataField="NumPickTicket" HeaderText="PickTicket" UniqueName="NumPickTicket" ReadOnly="true" >
  <HeaderStyle Width="100px" />
 </rad:GridBoundColumn>
 <rad:GridBoundColumn DataField="NumPickLin" HeaderText="PickLine"  UniqueName="NumPickLin" ReadOnly="true" >
  <HeaderStyle Width="100px" />
 </rad:GridBoundColumn>
 <rad:GridBoundColumn DataField="QtyToPick" HeaderText="ToPick" UniqueName="QtyToPick" ReadOnly="true" >
  <HeaderStyle Width="100px" />
 </rad:GridBoundColumn>
 <rad:GridBoundColumn DataField="QtyPicked" HeaderText="Picked" UniqueName="QtyPicked" ReadOnly="true" >
  <HeaderStyle Width="100px" />
 </rad:GridBoundColumn>
</Columns>
<DetailTables>
<rad:GridTableView DataSourceID="DetailDataSource1" Name="DS1Detail"
CellSpacing="-1">
<ParentTableRelation>
 <rad:GridRelationFields DetailKeyField="Day" MasterKeyField="Day" />
</ParentTableRelation>
<Columns>
  <rad:GridBoundColumn DataField="PickTicket" HeaderText="PickTicket" UniqueName="PickTicket" ReadOnly="true" >
  </rad:GridBoundColumn>
  <rad:GridBoundColumn DataField="PickDurationSecPerPickLin" HeaderText="PickDurationSecPerPickLin" UniqueName="PickDurationSecPerPickLin" ReadOnly="true" DataFormatString="{0:#,###.##}" >
  </rad:GridBoundColumn>
  <rad:GridBoundColumn DataField="PickDurationSecPerQtyToPick" HeaderText="PickDurationSecPerQtyToPick" UniqueName="PickDurationSecPerQtyToPick" ReadOnly="true" DataFormatString="{0:#,###.##}" >
  </rad:GridBoundColumn>
  <rad:GridBoundColumn DataField="PickDurationSec" HeaderText="PickDurationSec" UniqueName="PickDurationSec" ReadOnly="true" >
  </rad:GridBoundColumn>
  <rad:GridBoundColumn DataField="NumPickLin" HeaderText="NumPickLin" UniqueName="NumPickLin" ReadOnly="true" >
  </rad:GridBoundColumn>
  <rad:GridBoundColumn DataField="QtyToPick" HeaderText="QtyToPick" UniqueName="QtyToPick" ReadOnly="true" >
  </rad:GridBoundColumn>
  <rad:GridBoundColumn DataField="QtyPicked" HeaderText="QtyPicked" UniqueName="QtyPicked" ReadOnly="true" >
  </rad:GridBoundColumn>
</Columns>
</rad:GridTableView>
</DetailTables>
</MasterTableView>
</rad:RadGrid>

METHOD 2:

<rad:RadGrid ID="RadGrid1" Font-Size="Smaller" runat="server" PageSize="40" AllowPaging="True"
AutoGenerateColumns="False" ShowStatusBar="True" GridLines="None" MasterTableView-NoMasterRecordsText="No records; try different settings"
DataSourceID="MasterDatasource1" OnDetailTableDataBind="RadGrid1_DetailTableDataBind" OnInit="RadGrid1_Init" AllowFilteringByColumn="True" AllowSorting="True"
Width="989px" OnItemCreated="RadGrid1_ItemCreated" >
<PagerStyle Mode="Slider" />
<ClientSettings>
<Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True">
</Scrolling>
</ClientSettings>
<MasterTableView AutoGenerateColumns="False" DataKeyNames="Day" TableLayout="fixed">
<ExpandCollapseColumn Visible="True"></ExpandCollapseColumn>
<Columns>
 <rad:GridDateTimeColumn DataField="Day" HeaderText="Day" UniqueName="Day" ReadOnly="true" DataFormatString="{0:d}" 
 PickerType="DatePicker" >
 <HeaderStyle Width="189px" />
 </rad:GridDateTimeColumn>
 <rad:GridBoundColumn DataField="MinPerPickTicket" HeaderText="MinPerPickTicket" UniqueName="MinPerPickTicket" ReadOnly="true" DataFormatString="{0:#,###.##}" >
 <HeaderStyle Width="100px" />
 </rad:GridBoundColumn>
 <rad:GridBoundColumn DataField="SecPerPickLin" HeaderText="SecPerPickLin" UniqueName="SecPerPickLin" ReadOnly="true" DataFormatString="{0:d}"   >
  <HeaderStyle Width="100px" />
 </rad:GridBoundColumn>
 <rad:GridBoundColumn DataField="SecPerQtyToPick" HeaderText="SecPerQtyToPick" UniqueName="SecPerQtyToPick" ReadOnly="true" DataFormatString="{0:d}"   >
  <HeaderStyle Width="100px" />
 </rad:GridBoundColumn>
 <rad:GridBoundColumn DataField="PickDuration" HeaderText="PickDuration" UniqueName="PickDuration" ReadOnly="true" >
  <HeaderStyle Width="100px" />
 </rad:GridBoundColumn>
 <rad:GridBoundColumn DataField="NumPickTicket" HeaderText="PickTicket" UniqueName="NumPickTicket" ReadOnly="true" >
  <HeaderStyle Width="100px" />
 </rad:GridBoundColumn>
 <rad:GridBoundColumn DataField="NumPickLin" HeaderText="PickLine"  UniqueName="NumPickLin" ReadOnly="true" >
  <HeaderStyle Width="100px" />
 </rad:GridBoundColumn>
 <rad:GridBoundColumn DataField="QtyToPick" HeaderText="ToPick" UniqueName="QtyToPick" ReadOnly="true" >
  <HeaderStyle Width="100px" />
 </rad:GridBoundColumn>
 <rad:GridBoundColumn DataField="QtyPicked" HeaderText="Picked" UniqueName="QtyPicked" ReadOnly="true" >
  <HeaderStyle Width="100px" />
 </rad:GridBoundColumn>
</Columns>
<DetailTables>
<rad:GridTableView Name="DS1Detail"
CellSpacing="-1">

<Columns>
  <rad:GridBoundColumn DataField="PickTicket" HeaderText="PickTicket" UniqueName="PickTicket" ReadOnly="true" >
  </rad:GridBoundColumn>
  <rad:GridBoundColumn DataField="PickDurationSecPerPickLin" HeaderText="PickDurationSecPerPickLin" UniqueName="PickDurationSecPerPickLin" ReadOnly="true" DataFormatString="{0:#,###.##}" >
  </rad:GridBoundColumn>
  <rad:GridBoundColumn DataField="PickDurationSecPerQtyToPick" HeaderText="PickDurationSecPerQtyToPick" UniqueName="PickDurationSecPerQtyToPick" ReadOnly="true" DataFormatString="{0:#,###.##}" >
  </rad:GridBoundColumn>
  <rad:GridBoundColumn DataField="PickDurationSec" HeaderText="PickDurationSec" UniqueName="PickDurationSec" ReadOnly="true" >
  </rad:GridBoundColumn>
  <rad:GridBoundColumn DataField="NumPickLin" HeaderText="NumPickLin" UniqueName="NumPickLin" ReadOnly="true" >
  </rad:GridBoundColumn>
  <rad:GridBoundColumn DataField="QtyToPick" HeaderText="QtyToPick" UniqueName="QtyToPick" ReadOnly="true" >
  </rad:GridBoundColumn>
  <rad:GridBoundColumn DataField="QtyPicked" HeaderText="QtyPicked" UniqueName="QtyPicked" ReadOnly="true" >
  </rad:GridBoundColumn>
</Columns>
</rad:GridTableView>
</DetailTables>
</MasterTableView>
</rad:RadGrid>

METHOD 3:

<

 

rad:RadGrid ID="RadGrid1" Font-Size="Smaller" runat="server" PageSize="40" AllowPaging="True"

 

AutoGenerateColumns

 

="False" ShowStatusBar="True" GridLines="None" MasterTableView-NoMasterRecordsText="No records; try different settings"

 

OnDetailTableDataBind

 

="RadGrid1_DetailTableDataBind" OnInit="RadGrid1_Init" AllowFilteringByColumn="True" AllowSorting="True"

 

Width

 

="989px" OnNeedDataSource="RadGrid1_NeedDataSource" OnItemCreated="RadGrid1_ItemCreated" >

 

0
Pavlina
Telerik team
answered on 06 Apr 2009, 10:59 AM
Hello John,

If you want to achieve the desired functionality you need to define the ParentTableRelations/DataKeyNames for the MasterTableView/GridTableViews according to the database relations conventions.

            - the primary key column name for each table in the grid source (used for master/detail table population) should be added to the DataKeyNames collection of the respective master/detail table; 
            - the MasterKeyField in the GridRelationFields should match the primary key of the parent table in the corresponding relation; 
            - the DetailKeyField in the GridRelationFields should match the foreign key of the child table in the corresponding relation.

Find more information about hierarchy binding in the following help topics:
Hierarchical data-binding using declarative relations
Hierarchical data-binding using DetailTableDataBind event

I hope this information helps.

All the best,

Pavlina
the Telerik team

 


Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
John Davis
Top achievements
Rank 2
answered on 06 Apr 2009, 12:41 PM
Pavlina,
Thank you for your response.

I do not understand it.  Because this example, the one I followed, 

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/detailtabledatabind/defaultcs.aspx

does not define ParentTableRelations/DataKeyNames for the MasterTableView/GridTableViews, as you suggest. But it still works.

Also the technique in the above Telerik example works in a simple project I built, that I was planning on submitting with a support ticket.

Me problem is, the technique in the above Telerik example does not work in my full Web application. How can I debug or fix?

Steve

0
Pavlina
Telerik team
answered on 07 Apr 2009, 12:20 PM
Hello John Davis,

Unfortunately I could not reproduce the problem you are facing in your full Web application. At this point in order to find a quick solution/fix I will ask you to open a formal support ticket and send us your Web application. 
I will review it and get back to you with additional information/suggestions.

All the best,
Pavlina
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
John Davis
Top achievements
Rank 2
answered on 07 Apr 2009, 01:39 PM
Thank you for responding.  I found a solution, as part of ticket  202543.

But it would still help if you can confirm that it is not necessary to use

 ParentTableRelations/DataKeyNames for the MasterTableView/GridTableViews

to achieve a hierarchy.


For example it seems the following implements a hierarchy without a ParentTableRelation:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/detailtabledatabind/defaultcs.aspx

Steve
0
Pavlina
Telerik team
answered on 08 Apr 2009, 02:41 PM
Hello John,

You also have an option to generate the detail table content on demand intercepting the DetailTableDataBind event of the grid. Review the following articles for further details :
Hierarchical data-binding using DetailTableDataBind event
Programmatic Binding

Greetings,
Pavlina
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
John Davis
Top achievements
Rank 2
answered on 08 Apr 2009, 04:16 PM
Pavlina
Thank you for references.
Using the DetailTableDataBind event works well for me.
Steve
Tags
Grid
Asked by
Dan
Top achievements
Rank 2
Answers by
Vlad
Telerik team
Dan
Top achievements
Rank 2
John Davis
Top achievements
Rank 2
Pavlina
Telerik team
Share this question
or