<ig:webhierarchicaldatagrid id="ugSearch" runat="server" datakeyfields="*****" datamember="*****" headercaptioncssclass="PartyHeaderClass" autogeneratecolumns="False" autogeneratebands="False" width="98%" height="940px" altitemcssclass="PartyAltRowClass" itemcssclass="PartyRowClass" initialdatabinddepth="0" borderwidth="0px" OnRowIslandsPopulating="whdg_RowIslandsPopulating" >
Showing below message box when i Click on row (+) Sign
---------------------------Message from webpage---------------------------Runtime Exception: No child grid script descriptors are available!---------------------------OK ---------------------------
Hello Mike,
Thank You Being With Us. :-)
Yes, I have added DataKeyFields and DataMember. I have your sample code. But I am looking for below point in my code. Could you please create and share with us, an isolated sample that reproduces with cover below point in(IN VB.NET).
1) There is 4 level bands like parent (Employee) =>Department==>Account===>System
2) I have set up in aspx. page as i mention above discussion, please refer that structure, you can change column name, DataKeyFields and DataMember or rearrange structure according to you.
3) I have huge data in child bands, I want to load every child bands ON DEMAND, it’s on WebHierarchicalDataGrid1_RowIslandsPopulating,Whdg121_RowExpanded from database.
4) Custom logic - More rows to be added while On Demand runs in parent (Employee) table on particular condition.
5) We want to apply customize CSS from code behind(vb.net code).
6) I don't want to use initialdatabinddepth="-1" or initialdatabinddepth="0" in aspx page. Please set the depth binding from vb.net code(code behind)
We are using below Register Assembly
<%@ Register Assembly="Infragistics4.Web.v14.2, Version=14.2.20142.1028, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.Web.UI.GridControls" TagPrefix="ig" %>
Regards,
Abhijeet Dhoke
9766454368
Hello Abhijeet,
Thank you for the update. You code doesn’t show you are setting up the DataKeyFields and DataMember. Do you have or can create an isolated sample that reproduces this matter? If you like I can create a private case for this matter.
Thanks for your guidance.
Well I tried to run isolated solution which is give by you and its working perfectly, all event are firing properly.
Also I have added your sample code in my solution its working fine. If we compare with your same code with us, there is only one difference that you did not use initialdatabinddepth="-1" and we used it.
In my webhierarchicaldatagrid, initialdatabinddepth="-1" is defined and if I remove this, i am getting below error:
------------------------------
Message from webpage ------------------------------ Runtime Exception: No child grid script descriptors are available! --------------------------- OK ---------------------------
Note- I have added datakeyfields="****" and DataMember="****" to all Bands. datakeyfields we definewd are our Primary keys.
But still no luck.
Can you look the earlier code sample I shared with you and suggest what could be the possible cause not able to raise events RowExpanded and RowIslandsPopulating from my code?
Please let us know if you need more information on this query.
Thank you for the update. To look further into this matter to see what is happening with your code I would like you to send me an isolated sample that reproduces the behavior. For the RowIslandsPopulating event it appears you do not have a Handles ugSearchTrial.RowIslandsPopulating. Have you tried reproducing this in an isolated sample?
Thanks for prompt response,
I am using VB.net to load webhierarchicaldatagrid in our application.
You shared the events code for c#, I am facing issue with vb.net code as mentioned below:
.aspx page is as below:
--------------------------------------------------------------------------------------------------------------------
<asp:ScriptManager runat="server" ID="SGrid"> </asp:ScriptManager>
<ig:webhierarchicaldatagrid id="grid1" runat="server" datakeyfields="cstPQE"
datamember="Customer" headercaptioncssclass="PartyHeaderClass" autogeneratecolumns="False"
autogeneratebands="False" width="98%" height="940px" altitemcssclass="PartyAltRowClass"
itemcssclass="PartyRowClass" initialdatabinddepth="-1" borderwidth="0px" >
<%--Width="95px"--%>
<%--<ClientEvents RowExpanded="whdg_RowExpanded" />--%>
<Columns>
<ig:BoundDataField DataFieldName="TYPE1P" Key="TYPE1P" Header-Text="Type" Width="70px">
<Header Text="Type"></Header>
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="P1TRD1IND" Key="P1TRD1IND" Header-Text="!"
Width="20px">
<Header Text="!"></Header>
</Columns>
<Bands>
<ig:Band AutoGenerateColumns="false" DataMember="Account" Key="ACCT1PQE" DataKeyFields="ACCT1PQE,P1PQE"
HeaderCaptionCssClass="AccountHeaderClass" AltItemCssClass="AccountAltRowClass"
ItemCssClass="AccountRowClass" Width="100%">
<ig:BoundDataField DataFieldName="TYPE1Acct" Key="TYPE1Acct">
<Header Text="TYPE"></Header>
<ig:BoundDataField DataFieldName="ACCT1PQE" Key="ACCT1PQE">
<Header Text="ACC GSPQE"></Header>
<ig:BoundDataField DataFieldName="P1PQE" Key="P1PQE" Hidden="true">
<ig:Band AutoGenerateColumns="false" Width="100%" DataMember="Relationship" Key="RELN1PQE"
DataKeyFields="ACCT1PQE,RELN1PQE" HeaderCaptionCssClass="RelationshipHeaderClass"
AltItemCssClass="RelationshipAltRowClass" ItemCssClass="RelationshipRowClass">
<ig:BoundDataField DataFieldName="TYPE1RELN" Key="TYPE1RELN">
<ig:BoundDataField DataFieldName="RELN1TRD1IND" Key="RELN1TRD1IND" Width="15px">
<ig:BoundDataField DataFieldName="Cust1PQE" Key="Cust1ID" Hidden="true">
<ig:BoundDataField DataFieldName="ACCT1PQE" Key="ACCT1PQE" Hidden="true">
<ig:BoundDataField DataFieldName="RELN1PQE" Key="RELN1PQE" Hidden="true">
<ig:Band AutoGenerateColumns="false" Width="100%" GroupingSettings-GroupedRowCssClass="SystemAltRowClass"
DataMember="System" Key="SYSTEM1EDC" DataKeyFields="SYSTEM1EDC" HeaderCaptionCssClass="SystemHeaderClass"
AltItemCssClass="SystemAltRowClass" ItemCssClass="SystemRowClass">
<GroupingSettings GroupedRowCssClass="SystemAltRowClass">
</GroupingSettings>
<ig:BoundDataField DataFieldName="TYPE1SYST" Key="TYPE1SYST">
<ig:BoundDataField DataFieldName="SYST1TRD1IND" Key="SYST1TRD1IND" Width="15px">
</ig:Band>
</Bands>
<Behaviors>
<ig:ColumnResizing Enabled="true">
<ColumnSettings>
<ig:ColumnResizeSetting EnableResize="true" />
</ColumnSettings>
</ig:ColumnResizing>
</Behaviors>
<ig:ColumnResizing>
<%-- <ig:Paging EnableInheritance="True" >
</ig:Paging>--%>
<ig:Activation Enabled="true" ActiveRowCssClass="ActiveRowClass">
</ig:Activation>
<ig:Selection RowSelectType="Single" CellClickAction="Cell" CellSelectType="Single"
SelectedCellCssClass="SelCellClass" >
<SelectionClientEvents CellSelectionChanged="grid1_RowSelectionChanged" />
<AutoPostBackFlags CellSelectionChanged="True" RowSelectionChanged="True" />
</ig:Selection>
<ig:EditingCore>
<ig:RowAdding>
</ig:RowAdding>
</ig:EditingCore>
<ig:Clipboard>
</ig:Clipboard>
</ig:webhierarchicaldatagrid>
.aspx.vb page as below from which are handling events:
Protected Sub ugSearch_RowExpanded(sender As Object, e As Infragistics.Web.UI.GridControls.ContainerRowEventArgs) Handles ugSearchTrial.RowExpanded'Dim val As string =grid1.Rows(e.Row)End Sub
Protected Sub ugSearch_RowIslandsPopulating(sender As Object, e As Infragistics.Web.UI.GridControls.ContainerRowCancelEventArgs)
End Sub
Question - Above Events from VB.NET code not able to fire, could you please have look and suggest suitable solution.
OnRowExpanded="ugSearch_RowExpanded" OnRowIslandsPopulating="ugSearch_RowIslandsPopulating" tried this but this not woking