Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
390
No Child Grid Descriptors Are Available
posted

Hello

I have a WHDG binds to flat dataset. I make the relations via WHDS. If I set InitialDataBindDepth property to 1 there is no problem it can bind the child row without problems. But I want to bind the data with LoadOnDemand method. So if I set the InitialDataBindDepth to 0, it can see which parent record has child but it cannot bind data.

Here is my code (C#)


dsMessages = Messages.MesajGetir(RezervasyonRef, 3, 1);
dsKullanici = Messages.KisiGetir(RezervasyonRef, 0, 1);
dtMessages = dsMessages.Tables[0];
dtMessages.TableName = "tableMesaj";
dtKullanici = dsKullanici.Tables[0];
dtKullanici.TableName = "tableKisi";

Infragistics.Web.UI.DataSourceControls.DataView dvKisi = new Infragistics.Web.UI.DataSourceControls.DataView();

dvKisi.ID = "vBaslik";
dvKisi.DataMember = "tableKisi";
dvKisi.DataSource = dtKullanici;

#region comment dvMesaj
Infragistics.Web.UI.DataSourceControls.DataView dvMesaj = new Infragistics.Web.UI.DataSourceControls.DataView();

dvMesaj.ID = "vMesaj";
dvMesaj.DataMember = "tableMesaj";

dvMesaj.DataSource = dtMessages;

whdsShowMessages.DataRelations.Clear();
whdsShowMessages.DataViews.Clear();
whgridShowMessages.Rows.Clear();

whdsShowMessages.DataViews.Add(dvKisi);
whdsShowMessages.DataViews.Add(dvMesaj);

Infragistics.Web.UI.DataSourceControls.DataRelation drel =
new Infragistics.Web.UI.DataSourceControls.DataRelation("vBaslik", "ID", "vMesaj", "ID");
whdsShowMessages.DataRelations.Add(drel);
#endregion

whgridShowMessages.DataSource = whdsShowMessages;

whgridShowMessages.DataBind();


and here is the (.aspx)

<ig:WebHierarchicalDataSource ID="whdsShowMessages" runat="server">
</ig:WebHierarchicalDataSource>
<ig:WebHierarchicalDataGrid ID="whgridShowMessages" runat="server" InitialDataBindDepth="0"
Width="100%" DataKeyFields="ID"
AutoGenerateColumns="False" Key="whgridShowMessages" AutoGenerateBands="False"
onrowislandspopulating="whgridShowMessages_RowIslandsPopulating"
>
<Columns>
<ig:TemplateDataField Key="AdiSoyadi">
<Header Text="Gönderen">

</Header>
<ItemTemplate >
<asp:Label CssClass="selam" ID="lblRoom" runat="server"
Text='<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "AdiSoyadi") %>'> </asp:Label>

</ItemTemplate>
</ig:TemplateDataField>
<ig:TemplateDataField Key="Tarih">
<Header Text="Tarih">

</Header>
<ItemTemplate >
<asp:Label CssClass="selam" ID="lblRoom" runat="server"
Text='<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "Tarih") %>'> </asp:Label>

</ItemTemplate>
</ig:TemplateDataField>
</Columns>
<Bands>
<ig:Band Key="MessageContent" DataKeyFields="ID" DataMember="vMesaj" AutoGenerateColumns="False">
<Columns>
<ig:TemplateDataField Key="Mesaj">
<header text="Mesaj" />
<itemtemplate>
<asp:Label CssClass="selam" ID="lblRoom" runat="server"
Text='<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "Mesaj") %>'> </asp:Label>
</itemtemplate>
</ig:TemplateDataField>
</Columns>
</ig:Band>
</Bands>
</ig:WebHierarchicalDataGrid>